1023) { $s_in = substr($s_in, 0, 1023); $len = strlen($s_in); } $s_out = ""; for ($i=0; $i<$len; $i++) { $c = substr($s_in, $i, 1); if (slog_char_membership($c)) { $s_out = $s_out . $c; } else { //Use an underscore as a filler. $s_out = $s_out . "_"; } } return($s_out); } //------------------------------------------------------------------------ //Date/time format used for logging. This function returns //the canonical date/time string. // function slog_datetime_string() { $s = date("D m/d/y H:i:s"); return($s); } //------------------------------------------------------------------------ //Errors (something very wrong). // function slog_error($msg) { $logged_msg = "[ERR_, ". slog_datetime_string() . "] " . slog_logstring_member_force($msg); error_log($logged_msg); } //------------------------------------------------------------------------ //Warnings (something odd and/or potentially dangerous). // function slog_warn($msg) { $logged_msg = "[WARN, ". slog_datetime_string() . "] " . slog_logstring_member_force($msg); error_log($logged_msg); } //------------------------------------------------------------------------ //Informational entries (routine occurrences where there might be some //benefit of tracking it later. // function slog_info($msg) { $logged_msg = "[INFO, ". slog_datetime_string() . "] " . slog_logstring_member_force($msg); error_log($logged_msg); } //------------------------------------------------------------------------ ?>