Abstract Log4PHP

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Abstract Log4PHP

Jan Galler
Hey guys,
I’m using Log4PHP since some months now and I really like it. There are some “I don’t get it” things about the Log4PHP documentation, so I want to ask here.
My intention is to put a layer on top of Log4PHP so I can do things like:

$myCustomLogger->log(“This is a test”, array($obj1, $obj2), “INFO”);

And $myCustomLogger would be able to create a JSON-structure (maybe already some HTML-markup for the debug-objects $obj1, $obj2) and pass this information to Log4PHP. 
Here I think I’ll get a problem: File/Line information in Log4PHP get useless, can I do something about that?
Also I want to pass this log-entry into a custom web socket after saving it by Log4PHP. (The built-in socket thing is out of question, cause I’ve to use a framework).

So, the big question is: What should I do? Is there something in Log4PHP available to build own “appenders”, like my custom web socket communicator?



Best Regards
Jan Galler
Loading...