• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Log4j Console Output

 
Ranch Hand
Posts: 342
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Within my application I use log4j to see what's going on. I load my log4j settings from an xml file using the syntax below :-

DOMConfigurator.configure("xml/log4j.xml");

I output debug data using methods like :

final Logger logger = Logger.getLogger(Utility.class);
ogger.debug("something or other etc");

The XML config looks like :-

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>

<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<param name="Threshold" value="DEBUG"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-5p [%t] %c - %m%n"/>
</layout>
</appender>

<root>
<level value="debug" />
<appender-ref ref="CONSOLE" />
</root>
</log4j:configuration>

When I run my application from eclipse I see that the output appears in a eclipse window called "Console".

My question is, when I run the program from the DOS command line why don't I see any output in the DOS window, is that not the console in this case?

The application is a gui/swing application.

Many thanks in advance,

Dave
 
My, my, aren't you a big fella. Here, have a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic