following the previous articleOne of the technical notes of the "developed micro-e-commerce website"
, yesterday did the function of log processing.
for today's applications, the importance of logging is self-evident. It is hard to imagine an application that does not have any logging capabilities running in a production environment. Logs can provide a variety of functions, including the recording program run-time error messages, status information, debugging information and execution time information. In a production environment, logging is an important basis for finding the source of the problem. The various information that is generated when the application is run should be logged through the Log class library .
don't say much nonsense, attach the source code of the Log class library:
< span> = < span> = < span> = < span> = < span> = < span> = ' Log_ ' __construct () {< span> ->log_file_path = ->log_switch = ->log_max_len = (!self::Self::= Self:: record (THING log)/1-Error (err log) (,, (- (Self::== =->log_file_pre.-Self::=(->log_file_path., ' a ' ( 0: (Self::, ' THING LOG: '. ' ' .. ' ' ..(13 1: (Self::, ' ERROR LOG: '. ' ' .. ' ' ..(13 : (Self::, ' THING LOG: '. ' ' .. ' ' ..(13