Abbas Naderi abiusx at owasp.org
Sat Jul 20 14:44:21 UTC 2013

This is good, but we don't want a huge third party in our small package. If you can somehow provide the functionality without all the hassle, go for it. If you can't just add the wrapper to our library and let the developers fetch and set the log4php. Apache packages are known to be too bloated.
Notice: This message is digitally signed, its source and integrity are verifiable.
If you mail client does not support S/MIME verification, it will display a file (smime.p7s), which includes the X.509 certificate and the signature body.  Read more at Certified E-Mail with Comodo and Thunderbird in AbiusX.com

On Tir 26, 1392, at 10:31 AM, rahul chaudhary <rahul300chaudhary400 at gmail.com> wrote:

> Log4PHP is a library in Apache Projects which is used for event logging inside PHP. Its a pretty nice library with most of the functions that one might need.
> Here is how it works:
> They have separated the logging into three components.
> First you define a logger that contains functions to log something. You can define as many loggers as you like, specific to each class or however you like...you can even make those loggers in hierarchy where the child loggers can inherit from parent loggers.
> Note that loggers themselves are not capable of logging...they just are "plugs" that has to connected to other components. Its like preparing to log something.
> Then there comes "appenders". These define the places where your log files would go. e.g. syslog, console, files, DB etc.... One logger can have many appenders. So suppose you append console and files to your logger, then your logs would go to both of them.
> Lastly there are "layouts". These are responsible for your logs to be converted to string and store them in the proper place. Every appender must have a layout defined, otherwise default is used.
> For configurations, you can define all of the above via two methods:
> 1) you can have a XML file to represent what loggers would use what appenders and layout. Pretty neat.
> 2) You can define a PHP array to do the above. Not so neat.
> Additonally there are levels for logging (total 6 levels) - high level logs such as FATAL ERRORS and low level logs such as INFO, DEBUG etc. Since its an hierarchy, you define a level for your logs. Suppose you choose level 3. Then your logs would be available for level 3 and above. i.e. logs will be recoreded for the current logs and levels above it.
> The structure of the entire library is not at all complicated. Since the components are divided into 3 types - logger, appender, layout, - you can choose any storage type in the appenders - file, DB, etc ...anything...
> Hope this helps. :)
> -- 
> Regards,
> Rahul Chaudhary
> Ph - 412-519-9634
> _______________________________________________
> OWASP_PHP_Security_Project mailing list
> OWASP_PHP_Security_Project at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/owasp_php_security_project

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.owasp.org/pipermail/owasp_php_security_project/attachments/20130720/299fb1df/attachment.html>

More information about the OWASP_PHP_Security_Project mailing list