Details
-
Type: Task
-
Status: Resolved
-
Priority: Minor
-
Resolution: Not A Bug
-
Affects Version/s: 3.6.7
-
Fix Version/s: None
-
Component/s: Core
-
Labels:None
-
Number of attachments :
Description
My Log4j.properties contains….
=====================================
log4j.rootLogger=INFO, STDOUT
log4j.category.freemarker.beans=OFF
log4j.category.freemarker.cache=OFF
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
log4j.appender.STDOUT.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
=====================================
when I run my program in debug mode, It looks like it truns off the freemarker.cache and freemarker.beans. that should not display freemarker messages, however It does appear on console - see the message at the end)
log4j: Trying to find [log4j.xml] using context classloader sun.misc.Launcher$AppClassLoader@14fe5c.
log4j: Trying to find [log4j.xml] using sun.misc.Launcher$ExtClassLoader@47858e class loader.
log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource().
log4j: Trying to find [log4j.properties] using context classloader sun.misc.Launcher$AppClassLoader@14fe5c.
log4j: Using URL file:/C:/xxx/project1/folder1/target/test-classes/log4j.properties for automatic log4j configuration.
log4j: Reading configuration from URL file:/ /C:/xxx/project1/folder1/target/test-classes/log4j.properties
log4j: Parsing for [root] with value=[INFO, STDOUT, R].
log4j: Level token is [INFO].
log4j: Category root set to INFO
log4j: Parsing appender named "STDOUT".
log4j: Parsing layout options for "STDOUT".
log4j: Setting property [conversionPattern] to [%-4r [%t] %-5p %c %x - %m%n].
log4j: End of parsing for "STDOUT".
log4j: Parsed "STDOUT" options.
log4j: Parsing for [freemarker.cache] with value=[OFF].
log4j: Level token is [OFF].
log4j: Category freemarker.cache set to OFF
log4j: Handling log4j.additivity.freemarker.cache=[null]
log4j: Parsing for [freemarker.beans] with value=[OFF].
log4j: Level token is [OFF].
log4j: Category freemarker.beans set to OFF
log4j: Handling log4j.additivity.freemarker.beans=[null]
log4j: Finished configuring.
CONSOLE OUTPUT
All stories are complete
(AfterStories)
Generating reports view to C:\xxx\project1\folder1\target\jbehave' using formats '[console, html, stats, txt]' and view properties '
{defaultFormats=stats, decorateNonHtml=true, viewDirectory=view, decorated=ftl/jbehave-report-decorated.ftl, reports=ftl/jbehave-reports-with-totals.ftl, maps=ftl/jbehave-maps.ftl, navigator=ftl/jbehave-navigator.ftl, views=ftl/jbehave-views.ftl, nonDecorated=ftl/jbehave-report-non-decorated.ftl}'
2012-09-04 11:18:36,616 DEBUG [main] freemarker.cache
Could not find template in cache, creating new one; id=[ftl/jbehave-report-decorated.ftl[en_US,Cp1252,parsed] ]
2012-09-04 11:18:36,616 DEBUG [main] freemarker.cache
Compiling FreeMarker template ftl/jbehave-report-decorated.ftl[en_US,Cp1252,parsed] from jar:file:/C:/Documents%20and%20Settings/user/.m2/repository/org/jbehave/jbehave-core/3.6.7/jbehave-core-3.6.7.jar!/ftl/jbehave-report-decorated.ftl
2012-09-04 11:18:36,726 DEBUG [main] freemarker.cache
Could not find template in cache, creating new one; id=[ftl/sh.ftl[en_US,Cp1252,parsed] ]
2012-09-04 11:18:36,726 DEBUG [main] freemarker.cache
Compiling FreeMarker template ftl/sh.ftl[en_US,Cp1252,parsed] from jar:file:/C:/Documents%20and%20Settings/user/.m2/repository/org/jbehave/jbehave-core/3.6.7/jbehave-core-3.6.7.jar!/ftl/sh.ftl
Activity
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Not A Bug [ 6 ] |
How are you running your program in debug mode?
When I use the log4 file and set the root logger to DEBUG, the debug output is correctly switched off with log4.category.freemarker=OFF, so I assume you are using another method to switch to debug mode that overrides the settings.