No user operation log is recorded ** @ param $ message Log message * @ param $ type Log type * @ param $ level log level * @ returnvoid * function_log ($ messagearray (), $ typedebug, $ levellog) {error_log (sprintf ([% s] % s % sn, $ level, date (Ymd
No logs/*** logs user operation logs * @ param $ message Log message * @ param $ type Log type * @ param $ level log level * @ return void */function _ log ($ message = array (), $ type = "debug", $ level = "log") {error_log (sprintf ("[% s] % s \ n", $ level, date ("Y/m/d
Logging <无>
/*** Record user operation logs ** @ param $ message log message * @ param $ type log type * @ param $ level log level * @ return void */function _ log ($ message = array (), $ type = "debug", $ level = "log") {error_log (sprintf ("[% s] % s \ n", $ level, date ("Y/m/d H: I: s"), implode ("", $ message), 3, getLogFile ($ type ));} /*** create the log directory file APP_ROOT/logs/_ ENV _/Ymd/Ym/{$ log_type} _ 20141111.log * @ notice the log directory must have read and write permissions * @ param $ log_type directory * @ return string write File directory * @ CONSTANT _ ENV _ Development Environment * @ CONSTANT APP_ROOT log root directory */function getLogFile ($ log_type) {$ today = time (); $ date = date ("Ymd", $ today); $ folder_name = substr ($ date, 0, 6); $ fnames = array (_ ENV __, $ folder_name, $ date); $ len = count ($ fnames); $ idx = 0; $ filepath = APP_ROOT. 'logs/'; do {$ filepath. = $ fnames [$ idx ++]. '/'; if (! File_exists ($ filepath) {mkdir ($ filepath, 0755) ;}} while ($ idx <$ len); return $ filepath. $ log_type. "_". $ date. ". log ";}