silikonci.blogg.se

Xlog global
Xlog global





xlog global

To make your life easier, the last two arguments may be disgarded, as default values are provided by XLOG implementation, providing the usual levels of DEBUG, INFO, NOTIFY (warning) and ALERT (fatal error). (optionally) the array defining these logging levels as a hash mapping each logging name with a unique integer level.(optionally) the level of logging you want - in order to, during the development stage, log debugging data, then during production stage only log fatal errors data,.

xlog global

the name of the file instantiating the XLOG_Logger object (this is to easily trace the logging source),.the log file path used with this object,.You can then instantiate an XLOG_Logger object providing the arguments needed by the class constructor: The Web server MUST have write permission to the log files. Once again, in a Web environment, choose to locate your log files outside your server root directory and, for instance, create a subdirectory in the xlog directory you have previously created to group your log files in /www/xlog/logs/. Then you have to define the path to the log file(s) you will use with XLOG. So, we recommand to put the XLOG class files in a library directory outside the root directory of the Web server.įor instance, if your Web server root directory is /www/domain/, create a /www/xlog directory and copy the distribution phplib directory and its content in that new directory. However, when using XLOG within a Web application, don't forget that XLOG writes directly to files which MUST NOT be accessible to a browser agent. The XLOG class files can be located anywhere in the file hierarchy of your program documents.

#Xlog global code#

This is done, in PHP, thru the include_once directive (see sample code here). To use XLOG framework within your application, you first have to import XLOG classes.







Xlog global