Skip to content

Easy Up Migration From Existing Log4Php Applications To Psr Logger Applications

It is a bit mean to put such a headline on top, but thats the current status we have to deal with at our company. I also don't want to bash somebody, Log4Php is doing its job in a great way. But since i developed a proxy logger component, i want to use it. The proxy logger component can work with psr logger interface, so i need to create a adapter to get it used ;-).

The psr and log4php adapter is a easy component and provides only two classes.

  • Log4Php to Psr Logger Bridge
  • Psr Logger to Log4PhP Bridge
  • Log4Php Logger Interface

The usage is simple, depending on the way you either choose the adapter "Log4PhpToPsrLoggerAdapter" or "PsrToLog4PhpAdapter". The only drawback, you are loosing the "trace" log level of log4php and all the fancy stuff of a log4php logger. This component is simple and has just a few lines of code (you are welcome to join), so the main focus is to support the log level methods like "$logger->warn()" and not more.

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Markdown format allowed
Form options