Re: setting a log file per core with slf4

2008-12-17 Thread Erik Hatcher
MDC looks like the way to go. Thanks for that info, David. Erik On Dec 17, 2008, at 3:13 PM, Smiley, David W. wrote: You bet it does; that's the point! Under the covers, I believe it's simply a thread-local hashmap. Nothing is stored in the loggers the code is using. We just need

Re: setting a log file per core with slf4

2008-12-17 Thread Smiley, David W.
You bet it does; that's the point! Under the covers, I believe it's simply a thread-local hashmap. Nothing is stored in the loggers the code is using. We just need to be careful to remove the variable from MDC when we're done. ~ David On 12/17/08 3:09 PM, "Ryan McKinley" wrote: but does t

Re: setting a log file per core with slf4

2008-12-17 Thread Ryan McKinley
but does this work in a multi-threaded environment? if multiple requests are coming in on multiple threads, would it still be accurate? Perhaps that depends on the underlying implementation? adding the core to the MDC within a RequestHandler context seems reasonable and minimally invasive.

Re: setting a log file per core with slf4

2008-12-17 Thread Erik Hatcher
On Dec 17, 2008, at 2:17 PM, Erik Hatcher wrote: We get the Logger everytime we use it with something like: Logger log = LoggerFactory.getLogger(classname+":"+core.getName() ); but with a dot separator and the core in front, since the logging configuration treats dots as hierarchical logging

Re: setting a log file per core with slf4

2008-12-17 Thread Smiley, David W.
I propose that MDC or NDC be used instead. I prefer MDC. I've written some server-side multi-threaded code where each Thread would run a job and I wanted the job name in the logs. http://www.slf4j.org/api/org/slf4j/MDC.html At some early point when Solr receives a request, you simply store a

Re: setting a log file per core with slf4

2008-12-17 Thread Erik Hatcher
On Dec 17, 2008, at 12:24 PM, Ryan McKinley wrote: I'm not sure I understand... are you suggesting that rather then configuring our logger like this: static Logger log = LoggerFactory.getLogger(SolrCore.class); We get the Logger everytime we use it with something like: Logger log = LoggerFact

Re: setting a log file per core with slf4

2008-12-17 Thread Noble Paul നോബിള്‍ नोब्ळ्
>> Hey there, >>>> >>>> My original app (before getting into Solr) use to have 3 index in the >>>> same >>>> web app. I used log4j with a log file per index. >>>> >>>> Now in Solr I have different cores and I am trying to

Re: setting a log file per core with slf4

2008-12-17 Thread Ryan McKinley
21027267.html#a21027540 You can just instantiate a log file per sol web_app and not per core? Thanks in advance -- View this message in context: http://www.nabble.com/setting-a-log-file-per-core-with-slf4-tp21051199p21051199.html Sent from the Solr - User mailing list archive at Nabble.com.

Re: setting a log file per core with slf4

2008-12-17 Thread Ryan McKinley
how to do it. As I understood this thread: http://www.nabble.com/Details-on-logging-in-Solr-td21027267.html#a21027540 You can just instantiate a log file per sol web_app and not per core? Thanks in advance -- View this message in context: http://www.nabble.com/setting-a-log-file-per-core-with-

Re: setting a log file per core with slf4

2008-12-17 Thread Erik Hatcher
is thread: http://www.nabble.com/Details-on-logging-in-Solr-td21027267.html#a21027540 You can just instantiate a log file per sol web_app and not per core? Thanks in advance -- View this message in context: http://www.nabble.com/setting-a-log-file-per-core-with-slf4-tp21051199p21051199.html Sent from

Re: setting a log file per core with slf4

2008-12-17 Thread Marc Sturlese
I am trying to set a log file >> per >> core via slf4 but don't know how to do it. >> As I understood this thread: >> http://www.nabble.com/Details-on-logging-in-Solr-td21027267.html#a21027540 >> You can just instantiate a log file per sol web_app and not per core?

Re: setting a log file per core with slf4

2008-12-17 Thread Ryan McKinley
how to do it. As I understood this thread: http://www.nabble.com/Details-on-logging-in-Solr-td21027267.html#a21027540 You can just instantiate a log file per sol web_app and not per core? Thanks in advance -- View this message in context: http://www.nabble.com/setting-a-log-file-per-core

setting a log file per core with slf4

2008-12-17 Thread Marc Sturlese
http://www.nabble.com/Details-on-logging-in-Solr-td21027267.html#a21027540 You can just instantiate a log file per sol web_app and not per core? Thanks in advance -- View this message in context: http://www.nabble.com/setting-a-log-file-per-core-with-slf4-tp21051199p21051199.html Sent from the Solr -