How can raven-php be used with log4php to log to sentry

136 views Asked by At

I have an existing PHP project using log4php, and I'm looking for some sort of LoggerAppenderSentry as suggested in this issue, to log messages to sentry using the log4php logger object.

Unfortunately, the existing appenders do not seem to support sentry yet.

Alternatively, if no existing solutions exist in the wild, I would love some guidelines / tutorial / blog entry as to how to write a custom appender for log4php.

1

There are 1 answers

0
tutuDajuju On BEST ANSWER

The author of mentioned issue, Valdemar Jordan, has been so kind to publish his appender in a fork of log4php on github.

I confirmed this solution to work properly, for more info, see the appender source and my pull request for more usage details.