Hi PHPers, long time no see, at my current job we recently decided to unify the way we log cross repos and cross languages, our legacy code for logging is pretty diverse, we use different functions to log, some uses error_log other writes straight to file other to scribe, and many mix all the above. This is relatively good, because we don't miss a beat, everything is logged, the bad part is that our disk space is often an issue, so on top of log rotate we've to move the logs on backups, which are sparse as well.
Scribe is pretty cool, because it store everything in one place, which then we move somewhere else to save disk space, again! We're considering to use syslog as common logging for all languages, mostly PHP, Java and Python (Scala, Perl, Ruby ...), so we can finally log with a standard format, e.g.: TIME - HOSTNAME PID [LOG LEVEL] MESSAGE For PHP we'll probably use Monolog, someone suggested to use it wrapped into helper functions such as sail_info(), sail_debug(), sail_error(), sail_warn(), I'm personally skeptical for this solution because not too maintainable, but I agree that Monolog is too verbose and quite ugly to remember. What's your experience with logging? Is there anything that you could suggesting to do and (especially) not to do when organizing the logs? I'll be happy to hear any of your comments. Thanks, Federico.
_______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show-participation