how to disable logging: DEBUG net.liftweb.db.ProtoDBVendor ...

205 views
Skip to first unread message

aa

unread,
Jun 1, 2011, 11:58:27 PM6/1/11
to Lift
Following the example from http://www.assembla.com/spaces/liftweb/wiki/Using_Maven

I generate a project using

mvn archetype:generate \
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-basic_2.8.1 \
-DarchetypeVersion=2.3 \
-DarchetypeRepository=http://scala-tools.org/repo-releases \
-DremoteRepositories=http://scala-tools.org/repo-releases \
-DgroupId=com.company \
-DartifactId=lift_test \
-Dversion=1.0

When I run the server, it print out lots of log messages like:

20:52:44.961 [2050052200@qtp-1668695240-0] DEBUG
net.liftweb.db.ProtoDBVendor - Released connection. poolSize=2
20:52:44.964 [2050052200@qtp-1668695240-0] DEBUG comet_trace - AJAX
Request: 1dm0lnuikp5od1g2kn6js8oc9e Map(__lift__GC -> List(_))
20:52:44.965 [2050052200@qtp-1668695240-0] DEBUG
net.liftweb.db.ProtoDBVendor - Released connection. poolSize=2
20:52:44.967 [2050052200@qtp-1668695240-0] INFO
net.liftweb.util.TimeHelpers - Service request (POST) /ajax_request/
F1112692917455T43MNW/ returned 200, took 8 Milliseconds
20:53:59.978 [2050052200@qtp-1668695240-0] DEBUG
net.liftweb.db.ProtoDBVendor - Released connection. poolSize=2
20:53:59.981 [2050052200@qtp-1668695240-0] DEBUG comet_trace - AJAX
Request: 1dm0lnuikp5od1g2kn6js8oc9e Map(__lift__GC -> List(_))
20:53:59.982 [2050052200@qtp-1668695240-0] DEBUG
net.liftweb.db.ProtoDBVendor - Released connection. poolSize=2

I want to know how to turn these logging messages off. I searched the
generated code, but cannot find a clue.

Anyone knows?

Thanks.

Diego Medina

unread,
Jun 2, 2011, 3:12:19 AM6/2/11
to lif...@googlegroups.com
Hi,

You can disable those messages setting the logging level that you prefer.

I use logback and my configuration file is:


$ cat src/main/resources/props/default.logback.xml
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
%msg%n</Pattern>
</layout>
</appender>

<logger name="code.snippet" level="info"/>
<logger name="code.api" level="info"/>
<logger name="code.model" level="info"/>
<logger name="code.comet" level="info"/>
<logger name="code.lib" level="info"/>

<root level="error">
<appender-ref ref="STDOUT" />
</root>
</configuration>


I hope it helps

Diego


On Wed, Jun 1, 2011 at 11:58 PM, aa <agai...@gmail.com> wrote:
> Following the example from http://www.assembla.com/spaces/liftweb/wiki/Using_Maven
>
> I generate a project using
>
> mvn archetype:generate \
>  -DarchetypeGroupId=net.liftweb \
>  -DarchetypeArtifactId=lift-archetype-basic_2.8.1 \

>  -DarchetypeYou caVersion=2.3 \

> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>
>

--
Diego Medina
Web Developer
http://www.fmpwizard.com

aa

unread,
Jun 3, 2011, 2:12:33 AM6/3/11
to Lift
Thanks, this worked in dev env.

> $  cat src/main/resources/props/default.logback.xml

When I try to put it in production env, I copy the file to:

src/main/resources/props/production.logback.xml

But it still generate the DEBUG log there, is there something else I
should change?

Thanks.

Sergey Trofimov

unread,
Jun 3, 2011, 3:07:11 AM6/3/11
to lif...@googlegroups.com
The file should be named as production.default.logback.xml

David Pollak

unread,
Jun 3, 2011, 10:58:03 AM6/3/11
to lif...@googlegroups.com
Should we update the archetypes and sbt templates to have this file in by default?
Lift, the simply functional web framework http://liftweb.net

Diego Medina

unread,
Jun 3, 2011, 11:02:20 AM6/3/11
to lif...@googlegroups.com
On Fri, Jun 3, 2011 at 10:58 AM, David Pollak
<feeder.of...@gmail.com> wrote:
> Should we update the archetypes and sbt templates to have this file in by
> default?

+1

Reply all
Reply to author
Forward
0 new messages