You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Boogie Shafer <bo...@ebrary.com> on 2013/05/20 18:44:43 UTC

solr UI logging when using logback?

i have logging working for the most part with logback 1.0.13 and slf4j
1.7.5 under solr 4.3.0 (or previously under solr 4.2.1)

with two exceptions, i'm very happy with the setup as i can get all the
jetty request logs, and various solr service events logged out with
rotation, etc

BUT i havent figured out what i need to do to get the logging events to
display in the SOLR admin ui

e.g. at http://solr-hostname:8983/solr/#/~logging


AND
i'm wondering if its possible to get the jetty start log managed under
logback


anybody have any pointers on these topics?

---

the configuration details of my setup are summarized in the rpm building
process here
https://github.com/boogieshafer/jetty-solr-rpm

Re: solr UI logging when using logback?

Posted by Daniel Collins <da...@gmail.com>.
Ah I vaguely remember seeing that when we first used logback (on 4.0), as 
Shawn says I think its the problem that as logback is starting up, where can 
it log before it has configured its logging (catch-22), answer it has to log 
to its own internal format.

If memory serves we just disabled that logging, but I don't recall the exact 
syntax, I don't have access to my work setup now, but will try and check 
tomorrow.

We don't use the request log, so that is one difference.

-----Original Message----- 
From: Shawn Heisey
Sent: Tuesday, May 21, 2013 1:42 PM
To: solr-user@lucene.apache.org
Subject: Re: solr UI logging when using logback?

On 5/20/2013 11:23 PM, Boogie Shafer wrote:
> in the YYYY_MM_DD-HHmmssSSS.start.log i get messages like this
>
> cat 2013_05_15-141100827.start.log
>
> Establishing start.log on Wed May 15 14:11:12 PDT 2013
> 14:11:15,756 |-INFO in null - Will use configuration file
> [resources/logback-access.xml]
> 14:11:15,768 |-INFO in
> ch.qos.logback.access.joran.action.ConfigurationAction - debug attribute
> not set
> 14:11:15,769 |-INFO in
> ch.qos.logback.core.joran.action.StatusListenerAction - Added status
> listener of type [ch.qos.logback.core.status.OnConsoleStatusListener]
> 14:11:15,770 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
> About to instantiate appender of type
> [ch.qos.logback.core.rolling.RollingFileAppender]
> 14:11:15,770 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
> Naming appender as [FILE]
> 14:11:15,774 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will 
> use
> gz compression

That's really interesting.  This appears to be the initialization of
logback itself, not jetty.  If nobody steps up who's familiar with
slf4j/logback with jetty, you might need to use a mailing list for one
of those projects.

Thanks,
Shawn


Re: solr UI logging when using logback?

Posted by Shawn Heisey <so...@elyograg.org>.
On 5/20/2013 11:23 PM, Boogie Shafer wrote:
> in the YYYY_MM_DD-HHmmssSSS.start.log i get messages like this
> 
> cat 2013_05_15-141100827.start.log
> 
> Establishing start.log on Wed May 15 14:11:12 PDT 2013
> 14:11:15,756 |-INFO in null - Will use configuration file
> [resources/logback-access.xml]
> 14:11:15,768 |-INFO in
> ch.qos.logback.access.joran.action.ConfigurationAction - debug attribute
> not set
> 14:11:15,769 |-INFO in
> ch.qos.logback.core.joran.action.StatusListenerAction - Added status
> listener of type [ch.qos.logback.core.status.OnConsoleStatusListener]
> 14:11:15,770 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
> About to instantiate appender of type
> [ch.qos.logback.core.rolling.RollingFileAppender]
> 14:11:15,770 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
> Naming appender as [FILE]
> 14:11:15,774 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use
> gz compression

That's really interesting.  This appears to be the initialization of
logback itself, not jetty.  If nobody steps up who's familiar with
slf4j/logback with jetty, you might need to use a mailing list for one
of those projects.

Thanks,
Shawn


Re: solr UI logging when using logback?

Posted by Boogie Shafer <bo...@ebrary.com>.
thanks for the pointer on the missing logwatcher for logback...i'll take a
look at that.

on the jetty logging side of things i get nearly all the jetty logging but
the initial startup logs which seem to happen prior to the other logging
jars getting loaded. perhaps i need to add a few more statements to my
logback.xml config, but it seems to be getting its naming
YYYY_MM_DD-HHmmssSSS.start.log and pattern from somewhere outside logback.

in the YYYY_MM_DD-HHmmssSSS.start.log i get messages like this

cat 2013_05_15-141100827.start.log

Establishing start.log on Wed May 15 14:11:12 PDT 2013
14:11:15,756 |-INFO in null - Will use configuration file
[resources/logback-access.xml]
14:11:15,768 |-INFO in
ch.qos.logback.access.joran.action.ConfigurationAction - debug attribute
not set
14:11:15,769 |-INFO in
ch.qos.logback.core.joran.action.StatusListenerAction - Added status
listener of type [ch.qos.logback.core.status.OnConsoleStatusListener]
14:11:15,770 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
About to instantiate appender of type
[ch.qos.logback.core.rolling.RollingFileAppender]
14:11:15,770 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
Naming appender as [FILE]
14:11:15,774 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use
gz compression




On Mon, May 20, 2013 at 10:11 AM, Shawn Heisey <so...@elyograg.org> wrote:

> On 5/20/2013 10:44 AM, Boogie Shafer wrote:
>
>> BUT i havent figured out what i need to do to get the logging events to
>> display in the SOLR admin ui
>>
>> e.g. at http://solr-hostname:8983/**solr/#/~logging<http://solr-hostname:8983/solr/#/~logging>
>>
>
> The logging page in the UI is populated by log watcher classes specific to
> the logging implementation.  Prior to 4.3, the only watcher available in
> released Solr versions was the one for java.util.logging.  The log4j
> watcher was incorporated in the 4.3.0 release.  I have been using log4j
> since 4.1-SNAPSHOT, but I don't yet have any 4.3 servers in production, so
> I can't get logs in my UI.
>
> To get log events in the UI with logback, you would need to implement a
> watcher specifically for logback.  I don't think this is a high priority
> item for the project at the moment, but patches are welcome.
>
>
>  AND
>> i'm wondering if its possible to get the jetty start log managed under
>> logback
>>
>
> On my setup using the jetty included with Solr and the slf4j/log4j jars in
> lib/ext, all jetty log entries are logged to the same file as my Solr logs,
> according to my log4j.properties file.
>
> If you have any logging config for jetty itself, then that will be used.
>  The easiest way to proceed is to simply comment or remove that logging
> config.  That will cause jetty to find slf4j in the classpath and use it,
> which you have already configured to use logback.  The example jetty config
> does not have any logging configured.
>
> Thanks,
> Shawn
>
>

Re: solr UI logging when using logback?

Posted by Shawn Heisey <so...@elyograg.org>.
On 5/20/2013 10:44 AM, Boogie Shafer wrote:
> BUT i havent figured out what i need to do to get the logging events to
> display in the SOLR admin ui
>
> e.g. at http://solr-hostname:8983/solr/#/~logging

The logging page in the UI is populated by log watcher classes specific 
to the logging implementation.  Prior to 4.3, the only watcher available 
in released Solr versions was the one for java.util.logging.  The log4j 
watcher was incorporated in the 4.3.0 release.  I have been using log4j 
since 4.1-SNAPSHOT, but I don't yet have any 4.3 servers in production, 
so I can't get logs in my UI.

To get log events in the UI with logback, you would need to implement a 
watcher specifically for logback.  I don't think this is a high priority 
item for the project at the moment, but patches are welcome.

> AND
> i'm wondering if its possible to get the jetty start log managed under
> logback

On my setup using the jetty included with Solr and the slf4j/log4j jars 
in lib/ext, all jetty log entries are logged to the same file as my Solr 
logs, according to my log4j.properties file.

If you have any logging config for jetty itself, then that will be used. 
  The easiest way to proceed is to simply comment or remove that logging 
config.  That will cause jetty to find slf4j in the classpath and use 
it, which you have already configured to use logback.  The example jetty 
config does not have any logging configured.

Thanks,
Shawn