

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
4 messages in org.apache.logging.log4j-userRE: logger.info() logs twice to the c...| From | Sent On | Attachments |
|---|---|---|
| nak...@drexel.edu | Jun 1, 2004 12:52 pm | |
| Alan Brown | Jun 1, 2004 3:33 pm | |
| john...@expeditors.com | Jun 1, 2004 3:57 pm | |
| nak...@drexel.edu | Jun 1, 2004 8:04 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | RE: logger.info() logs twice to the console | Actions... |
|---|---|---|
| From: | john...@expeditors.com (john...@expeditors.com) | |
| Date: | Jun 1, 2004 3:57:42 pm | |
| List: | org.apache.logging.log4j-user | |
Hello,
Is there any way to remove my name from this email list ???
Thank You,
Let me know if I can be of any more Service to You,
John Allen Air Import Agent Expeditors International - SFO Email: John...@Expeditors.com Ph: (650) 737-1712 Fax: (650) 737-0933
"Alan Brown" <abrown@opstechno To: "Log4J Users List" logy.com> <log4...@logging.apache.org> cc: (bcc: John Allen/SFO/Expeditors) 06/01/04 03:33 PM Subject: RE: logger.info() logs twice to the console Please respond to "Log4J Users List"
It sounds like you've not set additivity correctly (there's been a post on that subject already today).
your logger may have 2 appenders set to it, the fileAppender and a consoleAppender. This is in addition to the root logger which also has a consoleAppender causing double logging.
Or it could be that you have a hierarchy of loggers. Root the parent of X that is the parent of Y. If X and Root both log to the console and Y logs to a file, then you'd see the behaviour you describe. You need to set additivity to False to prevent the logging events propagating up the logger hierarchy.
It's hard to tell unless you post your config file.
alan
-----Original Message----- From: nak...@drexel.edu [mailto:nak...@drexel.edu] Sent: Tuesday, June 01, 2004 12:53 PM To: log4...@jakarta.apache.org Subject: logger.info() logs twice to the console
Hi,
I am seeing logger.info() requests to log the same messgae twice on the console. The logger has a FileAppender also and the files contains a single log of the twicely-logged-on-the-console message.
Here's some pseudocode:
class Foo { //create a logger object on Foo.class
//add apenders = File and Console
//start a process and open an input and output pipes to the process
//for each command written to the input pipe read the process's output from the output pipe and log it using logger.info(logMessage) }
Again, what I am seeing is that the logMessage gets logged twice on the console (unexpected), and once on the log file (expected).
Any suggestions?
Thanks, Nik
--------------------------------------------------------------------- To unsubscribe, e-mail: log4...@logging.apache.org For additional commands, e-mail: log4...@logging.apache.org







