You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Peter Koch <sy...@googlemail.com> on 2008/07/31 16:00:18 UTC

Stop Jackrabbit-Core to be verbose on console

Hi at all,
I've got a short question:
Is it possible to stop Jackrabbit printing information on console or
configure them with an Logging-System like Log4J?

typical example of printing:
"
187 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - Starting
repository...
234 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
LocalFileSystem initialized at path ***
625 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
LocalFileSystem initialized at path ***
1265 [main] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Database: H2 / 1.0.74 (2008-06-21)
1265 [main] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Driver: H2 JDBC Driver / 1.0.74 (2008-06-21)
1406 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - initializing
workspace 'default'...
1406 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
LocalFileSystem initialized at path ***
1406 [main] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Database: H2 / 1.0.74 (2008-06-21)
1406 [main] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Driver: H2 JDBC Driver / 1.0.74 (2008-06-21)
1625 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - workspace
'default' initialized
1922 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
LocalFileSystem initialized at path ***
2078 [main] INFO org.apache.jackrabbit.core.query.lucene.SearchIndex - Index
initialized: ***
2078 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
LocalFileSystem initialized at path ***
2156 [main] INFO org.apache.jackrabbit.core.query.lucene.SearchIndex - Index
initialized: ***
2156 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - Repository
started
2156 [main] INFO org.apache.jackrabbit.core.TransientRepository - Transient
repository initialized
2187 [main] INFO org.apache.jackrabbit.core.TransientRepository - Session
opened
"

thanks a lot,
Peter

Re: Stop Jackrabbit-Core to be verbose on console

Posted by Sébastien Launay <se...@anyware-tech.com>.
If you choose to use the log4j implementation you just need to
configure log4j before loading Jackrabbit classes.
Multiple configuration are possible [1].

J2EE listeners can also be used to configure log4j before creating
Logger and therefore share the same configuration.

If not configured, log4j will output messages in the default ouput stream
and therefore in the console in your case.

If you already have a configuration you just need to add the category
"org.apache.jackrabbit" and use WARN or ERROR level which will be less
verbose.

[1] http://commons.apache.org/logging/guide.html#Configuring%20Log4J
[2]
http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/web/util/Log4jConfigListener.html

--
Sébastien Launay

Peter Koch a écrit :
> Hi Sébastien,
> thanks for your fast answer.
> I've checkt slf4j into my project, but where is the configurationfile to
> modify the logging of jackrabbit-Core?
> The propertie-file on my project only handle my own logging statements...
>
> Thanks,
> Peter
>
> 2008/7/31 Sébastien Launay <se...@anyware-tech.com>
>
>   
>> Hi Peter,
>>
>> SLF4J is used to log messages and can be configured to use log4j
>> very much like Jakarta Commons Logging.
>>
>> You just need to add the jar slf4j-log4j12-1.0.jar to the classpath.
>>
>> For more information, see:
>>
>> http://www.mail-archive.com/jackrabbit-dev@incubator.apache.org/msg05003.html
>>
>> --
>> Sébastien Launay
>>
>> Peter Koch a écrit :
>>     
>>> Hi at all,
>>> I've got a short question:
>>> Is it possible to stop Jackrabbit printing information on console or
>>> configure them with an Logging-System like Log4J?
>>>
>>> typical example of printing:
>>> "
>>> 187 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - Starting
>>> repository...
>>> 234 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
>>> LocalFileSystem initialized at path ***
>>> 625 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
>>> LocalFileSystem initialized at path ***

Re: Stop Jackrabbit-Core to be verbose on console

Posted by Peter Koch <sy...@googlemail.com>.
Hi Sébastien,
thanks for your fast answer.
I've checkt slf4j into my project, but where is the configurationfile to
modify the logging of jackrabbit-Core?
The propertie-file on my project only handle my own logging statements...

Thanks,
Peter

2008/7/31 Sébastien Launay <se...@anyware-tech.com>

> Hi Peter,
>
> SLF4J is used to log messages and can be configured to use log4j
> very much like Jakarta Commons Logging.
>
> You just need to add the jar slf4j-log4j12-1.0.jar to the classpath.
>
> For more information, see:
>
> http://www.mail-archive.com/jackrabbit-dev@incubator.apache.org/msg05003.html
>
> --
> Sébastien Launay
>
> Peter Koch a écrit :
> > Hi at all,
> > I've got a short question:
> > Is it possible to stop Jackrabbit printing information on console or
> > configure them with an Logging-System like Log4J?
> >
> > typical example of printing:
> > "
> > 187 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - Starting
> > repository...
> > 234 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
> > LocalFileSystem initialized at path ***
> > 625 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
> > LocalFileSystem initialized at path ***
> > 1265 [main] INFO
> >
> org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
> > - Database: H2 / 1.0.74 (2008-06-21)
> > 1265 [main] INFO
> >
> org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
> > - Driver: H2 JDBC Driver / 1.0.74 (2008-06-21)
> > 1406 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - initializing
> > workspace 'default'...
> > 1406 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
> > LocalFileSystem initialized at path ***
> > 1406 [main] INFO
> >
> org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
> > - Database: H2 / 1.0.74 (2008-06-21)
> > 1406 [main] INFO
> >
> org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
> > - Driver: H2 JDBC Driver / 1.0.74 (2008-06-21)
> > 1625 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - workspace
> > 'default' initialized
> > 1922 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
> > LocalFileSystem initialized at path ***
> > 2078 [main] INFO org.apache.jackrabbit.core.query.lucene.SearchIndex -
> Index
> > initialized: ***
> > 2078 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
> > LocalFileSystem initialized at path ***
> > 2156 [main] INFO org.apache.jackrabbit.core.query.lucene.SearchIndex -
> Index
> > initialized: ***
> > 2156 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - Repository
> > started
> > 2156 [main] INFO org.apache.jackrabbit.core.TransientRepository -
> Transient
> > repository initialized
> > 2187 [main] INFO org.apache.jackrabbit.core.TransientRepository - Session
> > opened
> > "
> >
> > thanks a lot,
> > Peter
> >
> >
>

Re: Stop Jackrabbit-Core to be verbose on console

Posted by Sébastien Launay <se...@anyware-tech.com>.
Hi Peter,

SLF4J is used to log messages and can be configured to use log4j
very much like Jakarta Commons Logging.

You just need to add the jar slf4j-log4j12-1.0.jar to the classpath.

For more information, see:
http://www.mail-archive.com/jackrabbit-dev@incubator.apache.org/msg05003.html

--
Sébastien Launay

Peter Koch a écrit :
> Hi at all,
> I've got a short question:
> Is it possible to stop Jackrabbit printing information on console or
> configure them with an Logging-System like Log4J?
>
> typical example of printing:
> "
> 187 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - Starting
> repository...
> 234 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
> LocalFileSystem initialized at path ***
> 625 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
> LocalFileSystem initialized at path ***
> 1265 [main] INFO
> org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
> - Database: H2 / 1.0.74 (2008-06-21)
> 1265 [main] INFO
> org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
> - Driver: H2 JDBC Driver / 1.0.74 (2008-06-21)
> 1406 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - initializing
> workspace 'default'...
> 1406 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
> LocalFileSystem initialized at path ***
> 1406 [main] INFO
> org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
> - Database: H2 / 1.0.74 (2008-06-21)
> 1406 [main] INFO
> org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
> - Driver: H2 JDBC Driver / 1.0.74 (2008-06-21)
> 1625 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - workspace
> 'default' initialized
> 1922 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
> LocalFileSystem initialized at path ***
> 2078 [main] INFO org.apache.jackrabbit.core.query.lucene.SearchIndex - Index
> initialized: ***
> 2078 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
> LocalFileSystem initialized at path ***
> 2156 [main] INFO org.apache.jackrabbit.core.query.lucene.SearchIndex - Index
> initialized: ***
> 2156 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - Repository
> started
> 2156 [main] INFO org.apache.jackrabbit.core.TransientRepository - Transient
> repository initialized
> 2187 [main] INFO org.apache.jackrabbit.core.TransientRepository - Session
> opened
> "
>
> thanks a lot,
> Peter
>
>