It seems log4j is not the default. I was confused because I had a
log4j.properties file in there, dunno why.
Here's what I changed to tun on ALL logging levels for my console output:
URL url =
ClassLoader.getSystemResource("log.properties");
LogManager.getLogManager().readConfiguration(url.openStream());
the log.properties file is then something like this:
# Logging
handlers = java.util.logging.ConsoleHandler
.level = ALL
# Console Logging
java.util.logging.ConsoleHandler.level = ALL
If you wanted file logging at the INFO level it /might/ look something more
like this (I got this from
http://stackoverflow.com/questions/960099/how-to-set-up-java-logging-using-a-properties-file-java-util-logging):
# Logging
handlers = java.util.logging.FileHandler, java.util.logging.ConsoleHandler
.level = ALL
# File Logging
java.util.logging.FileHandler.pattern = %h/myApp.log
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.FileHandler.level = INFO
# Console Logging
java.util.logging.ConsoleHandler.level = ALL
On Feb 8, 2013, at 12:30 PM, Bjorn Roche wrote:
> I am having the exact same problem at this exact moment, only I am trying to
> increase the amount of logging instead of decrease.
>
> I tried what you suggested below and I also tried modifying the
> log4j.properties file, but neither method has worked for me so far :(
>
> I'll let you know if I make any progress.
>
> bjorn
>
>
> On Feb 8, 2013, at 11:52 AM, Daniele Dellafiore wrote:
>
>> Hi.
>>
>> I'm having troubles understanding how to control the restlet log. I
>> want to eliminate the afterHandle INFO logging, and I added in my
>> Application class:
>>
>> Engine.getLogger(LogFilter.class).setLevel(Level.WARNING);
>> Engine.getAnonymousLogger().setLevel(Level.WARNING);
>>
>> both in the constructor as well as in createInboundRoot but the INFO
>> log is always there.
>>
>> Any hint?
>>
>> --
>> Daniele Dellafiore
>> http://danieledellafiore.net
>>
>> ------------------------------------------------------
>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3048141
>
> -----------------------------
> Bjorn Roche
> http://www.xonami.com
> Audio Collaboration
> http://blog.bjornroche.com
> @xonamiaudio
>
>
>
>
>
>
>
-----------------------------
Bjorn Roche
http://www.xonami.com
Audio Collaboration
http://blog.bjornroche.com
@xonamiaudio
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3048152