Description
I'm using my logger in a distributed environment and really need another available field for MongoDB, called jobID, so I can tie a queued job to the logged event.
I think it could be handled with something like:
public function log( LoggerLevel $level, $message, $throwable = null, $extras = array('jobId' => new MongoId('foo123'), 'foo' => 'bar') )
{ _id: ObjectId("51c08aca162d280300000000"), jobId: ObjectId("foo123"), foo: 'bar', timestamp: ISODate("2013-06-18T16:28:58.017Z"), level: "ERROR", thread: 3, message: "User: xxx has no API credentials.", loggerName: "main", fileName: "/app/admin/protected/components/xxx.php", method: "_setApi", lineNumber: 86, className: "xxx" }
I tried to extend the Logger package to build this in, but I found it rather un-extensible. I ended up extending pretty much all the files, which at that point, may as well just edit the core files.
Thanks