[ 
https://issues.apache.org/jira/browse/LOG4PHP-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Habunek resolved LOG4PHP-208.
----------------------------------

    Resolution: Duplicate
      Assignee: Ivan Habunek

Brian, MDC support for mongodb appender will be available in next release of 
log4php.

> Add ability to pass more information to the MongoDB logger 
> -----------------------------------------------------------
>
>                 Key: LOG4PHP-208
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-208
>             Project: Log4php
>          Issue Type: Improvement
>          Components: Code
>            Reporter: Brian Thibault
>            Assignee: Ivan Habunek
>              Labels: mongo
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> 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: 
> {code}
> public function log( LoggerLevel $level, $message, $throwable = null, $extras 
> = array('jobId' => new MongoId('foo123'), 'foo' => 'bar') )
> {code}
> {code}
> {
>   _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"
> }
> {code}
> 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



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to