( ZN >= 5.0.0 )
The logbook was created to keep the data you want to keep on a file. In previous systems , this operation with report () method has been converted into the structure to be used as class by the specified version. In order to be able to perform the logging process, each project must be activated in its own configuration file.
For the system or users to be able to log , it is necessary to set the log -> createFile value to true from the above mentioned file .
|Bool||$ createFile = false||Enables logging.|
|String||$ fileTime = '30 day '||Specifies how long the log records will be stored.|
# Report ( ZN> = 5.0.0 )
Used to create log records.
|String||$ subject||Record the topic.|
|String||$ Message||Record content.|
|String||$ destination = NULL||Record purpose.|
|String||$ time = NULL||How long the record will be kept. If not specified, the time specified in the configuration file is assumed.|
Logger::report('User Login', 'Login Error', 'UserLogin', '10 month');
Above we have kept a record with the Login Error message file UserLogin with User Login and which will be held for 10 months. The path to the generated file is given below.
# Other methods ( ZN> = 5.0.0 )
The use of other methods other than the report () above is exactly the same and only includes 2 parameters. These are the content of the recording and the possession of it. Takes the subject and its purpose according to the method name.
Logger::notice('Notice Example Message');
Logger::warning('Warning Example Message');
# Content of a Log File
The contents of the log files generated by the above methods are in a form similar to the following.