Avner BenHanoch | 1 Jun 2003 12:01

Re: Getting all the appenders in all the loggers

you can always put all appenders in something like Set (see java.util.Set
and its implementation classes), then iterate on your set and get all the
elements uniquely.

----- Original Message -----
From: "Preetham Kajekar" <preetham <at> cisco.com>
To: "'Log4J Users List'" <log4j-user <at> jakarta.apache.org>
Sent: Friday, May 30, 2003 2:23 PM
Subject: RE: Getting all the appenders in all the loggers

>
>
> > -----Original Message-----
> > From: Vinodh Lakshminarayan [mailto:vinodhl <at> yahoo.com]
> > Sent: Friday, May 30, 2003 5:27 PM
> > To: Log4J Users List
> > Subject: Re: Getting all the appenders in all the loggers
> >
> >
> >
> > Try the following code
> >
> > Logger logger = .......... file://Your logger
>
>  I need to do it for all the loggers in the system. I know there is
> getAllLoggers() in LogManager. I was wondering if there is any other way
> of doing this coz with this approach, I may land up getting the same
> appender twice (if is associated with 2 loggers) and consequently
> rolling over twice. This can be avoided using a Hashtable etc, but more
> importantly, the code will be more computation than necessary.
(Continue reading)

Michael CATANZARITI | 2 Jun 2003 00:25
Picon
Favicon

new port to C++ of the log4j project

Good evening,

I'd like to announce a new port to C++ of the log4j project : log4cxx 
(http://sourceforge.net/projects/log4cxx)

Supported features :

Appenders:
AsyncAppender, SocketAppender, SocketHubAappender, TelnetAppender, 
NTEventLogAppender, ConsoleAppender, FileAppender, RollingFileAppender

Layouts:
TTCCLayout, HTMLLayout, PatternLayout, SimpleLayout, XMLLayout

Configurators:
DOMConfigurator

Regards,

Michael CATANZARITI
Rod Cope | 2 Jun 2003 18:55

[ANN] Log4j included in Out-of-the-Box Open Source distribution

Log4j is included in Out-of-the-Box 2.0, an intelligent distribution of over
100 Open Source projects for Java developers on both Linux and Windows.

Its graphical installer provides selective and incremental installation and
uninstallation, automatic project dependency management, easy project
configuration, and a highly-organized built-in project knowledge base.  When
installation completes, the selected projects are installed, configured,
integrated, tested (with live JUnit/HttpUnit test reports to prove it all
worked), running, and ready to use.

You get 10 custom sample applications, including ones for JBoss that take
advantage of XDoclet, Middlegen, Hibernate, AspectJ, and more.
Out-of-the-Box comes with a 350 page user guide that contains tips, gotchas,
and workarounds for the major projects, along with a substantial section on
JBoss.

The free Community Edition is fully functional, does not expire, and does
not require registration.  It installs just over 25 of the 100+ projects,
including JBoss, MySQL, and Castor, and comes with the Castor sample project
and nearly all of the Enterprise Edition documentation.

Please visit http://www.ejbsolutions.com for details or to download the free
Community Edition.

Rod
Ceki Gülcü | 2 Jun 2003 22:24
Picon
Gravatar

Re: log4j:ERROR Attempted to append to closed appender named [stdout]


At 06:41 PM 5/29/2003 -0500, you wrote:
>Hi all,
>
>TIA for any help on this.

Hi Ralph,

Please let other lists know about your conclusions as appropriate. I am not 
cross posting.

>At this stage I'm just trying to nail down which party to
>focus on. It seems there might be a gotcha related to
>FreeBSD Linux emulation or that a log4j or ofbiz
>developer might be able to guide me in the right
>direction for how to debug this. Any help from any
>party is much appreciated.
>
>The following line is appearing on my server's console:
>
>    log4j:ERROR Attempted to append to closed appender named [stdout].

[snip]

The internal log4j messages are sufficient to diagnose the problem. For 
some reason, the root logger is parsed twice. When PropertyConfigurator 
parses a file, each time it encounters a logger, it starts by closing all 
the appenders attached to that logger. Since the root logger is configured 
twice, the stdout appender is attached to root the first time the root 
logger is configured. In the second round, all the appenders in root are 
(Continue reading)

Gustavo Mata | 2 Jun 2003 22:28
Picon
Favicon

JDBC Appender

 All, I'm unable to get my JDBC Appender to work properly.  Below is the log4j.xml file.  I created a table in
oracle named TESTLOG with an attribute of MESSAGE with value of VARCHAR(255).   When I run the program, the
message are logged to the file, but not inserted into the table.  It also doesn't throw any exceptions.
&lt;appender name="FILE" class="org.apache.log4j.FileAppender"&gt;&lt;param name="File"
value="c:/log4jTesting/log/file.log" /&gt;&lt;param name="Append" value="false"
/&gt;&lt;layout class="org.apache.log4j.PatternLayout"&gt;&lt;param
name="ConversionPattern" value="%m%n" /&gt;&lt;/layout&gt;&lt;/appender&gt;&lt;appender
name="JDBC" class="org.apache.log4j.jdbc.JDBCAppender"&gt;&lt;param name="BufferSize"
value="4096" /&gt;&lt;param name="Driver" value="oracle.jdbc.driver.OracleDriver"
/&gt;&lt;param name="URL" value="jdbc:oracle:thin: <at> oradev1:1521:apccat" /&gt;&lt;param
name="User" value="catp1" /&gt;&lt;param name="Password" value="catp1" /&gt;&lt;param na

 me="sql" value="INSERT INTO LOGTEST( MESSAGE ) VALUES( '%m' )" /&gt;&lt;layout
class="org.apache.log4j.PatternLayout"&gt;&lt;param name="ConversionPattern" value="%m"
/&gt;&lt;/layout&gt;&lt;/appender&gt;&lt;category name="TestLog4J"&gt;&lt;priority
value="DEBUG" /&gt;&lt;appender-ref ref="FILE" /&gt;&lt;appender-ref ref="JDBC" /&gt;&lt;/category&gt;-Gus

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
Kwok Peng Tuck | 3 Jun 2003 01:57

Re: PropertyConfigure

If you assume the properties file to be in the current directory of the 
class you load it from and run it from the command line then your 
assumption is correct, the properties file will be found, because the 
current working directory of the jvm is the directory you launch the 
class from. If testing from an IDE, the working directory is the IDE's 
so it is looking for it in the incorrect place. You can correct this by 
passing an argument to your main class where you can specify the full 
path of the properties file, then attempt to load the file.
So on loading in a command line you can do this :
                java  mymain /home/yoke/props/log4j.properties
And in the mymain main method, just process the arguments to get the 
string you want.

Tan Yoke Yew wrote:

>--error--
>log4j:WARN No appenders could be found for logger
>(com.infopro.util.ptr.FormDocument).
>log4j:WARN Please initialize the log4j system properly.
>--end --
>
>i am having these error when i run my java application. i am using
>Eclipse
>IDE to run it.
>
>however, i create a simple single hello java application and it doens't
>return me any error.
>
>as i suppected, i think my PropertyConfigure didnt specify correctly.
>therefore, instead of put the PropertyConfigurator.configure(config) in
(Continue reading)

Chopra, Sumeet (Cognizant | 3 Jun 2003 08:16

Log4j and JMS problem

HI All,

I am facing a peculiar problem.
I have a wrapper built around log4j.

I have also a custom JMS Queue Appender.
now when I log msgses using a test servlet,
it works fine if the page is refreshed after a
certain point of time.

But if the page is refreshed very frequently(like pressing
F5 continuously).it generates an error.
"ERROR Attempted to append to closed appender named [JMS]."

Is it Log4j error ?
or some error in my configuration settings.

Kindly advise.

Thanks and Regards,
Sumeet Chopra.

****** Message from InterScan E-Mail VirusWall NT ******

** No virus found in attached file noname.htm
** No virus found in attached file noname.htm

No Virus detected in the attached file(s).
*****************     End of message     ***************

This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. If you are not the 
intended recipient, please contact the sender by reply e-mail and destroy all copies of 
the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying 
of this email or any action taken in reliance on this e-mail is strictly prohibited and 
may be unlawful.

          Visit us at http://www.cognizant.com

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe <at> jakarta.apache.org
For additional commands, e-mail: log4j-user-help <at> jakarta.apache.org
sandro.ruch | 3 Jun 2003 09:21
Favicon

Conversion Character M

hi everybody,

i am trying to use the conversion character "M" for outputting the method 
name where the logging request was issued.
unfortunately all log4j wirtes to the logfile is ?... the conversion 
configuration is the following:

value="%d{dd.MM.yyyy HH:mm:ss} %r [%t] *%-5p %-17c{2} [%M] - %m%n"

the log-statements are all of the following:

02.06.2003 10:45:52 5508343 [HttpListener-1:Thread-3] *DEBUG 
persistence.AbstractDBMapper [?] - Method execute called... 

any ideas?

kind regards,
sandro
Shapira, Yoav | 3 Jun 2003 14:40

RE: Conversion Character M


Howdy,
Was the relevant code compiled with debug information?  (i.e. -g or
whatever the debug switch is for your compiler?)

Yoav Shapira
Millennium ChemInformatics

>-----Original Message-----
>From: sandro.ruch <at> namics.com [mailto:sandro.ruch <at> namics.com]
>Sent: Tuesday, June 03, 2003 3:21 AM
>To: Log4J Users List
>Subject: Conversion Character M
>
>hi everybody,
>
>i am trying to use the conversion character "M" for outputting the
method
>name where the logging request was issued.
>unfortunately all log4j wirtes to the logfile is ?... the conversion
>configuration is the following:
>
>value="%d{dd.MM.yyyy HH:mm:ss} %r [%t] *%-5p %-17c{2} [%M] - %m%n"
>
>the log-statements are all of the following:
>
>02.06.2003 10:45:52 5508343 [HttpListener-1:Thread-3] *DEBUG
>persistence.AbstractDBMapper [?] - Method execute called...
>
>any ideas?
>
>kind regards,
>sandro

This e-mail, including any attachments, is a confidential business communication, and may contain
information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone
else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your
computer system and notify the sender.  Thank you.
sandro.ruch | 3 Jun 2003 15:46
Favicon

RE: Conversion Character M

thought of that... but i am not really sure if that is the case...
i'll try... thanks!

"Shapira, Yoav" <Yoav.Shapira <at> mpi.com>
03.06.2003 14:40
Please respond to "Log4J Users List"

 
        To:     "Log4J Users List" <log4j-user <at> jakarta.apache.org>
        cc: 
        Subject:        RE: Conversion Character M

Howdy,
Was the relevant code compiled with debug information?  (i.e. -g or
whatever the debug switch is for your compiler?)

Yoav Shapira
Millennium ChemInformatics

>-----Original Message-----
>From: sandro.ruch <at> namics.com [mailto:sandro.ruch <at> namics.com]
>Sent: Tuesday, June 03, 2003 3:21 AM
>To: Log4J Users List
>Subject: Conversion Character M
>
>hi everybody,
>
>i am trying to use the conversion character "M" for outputting the
method
>name where the logging request was issued.
>unfortunately all log4j wirtes to the logfile is ?... the conversion
>configuration is the following:
>
>value="%d{dd.MM.yyyy HH:mm:ss} %r [%t] *%-5p %-17c{2} [%M] - %m%n"
>
>the log-statements are all of the following:
>
>02.06.2003 10:45:52 5508343 [HttpListener-1:Thread-3] *DEBUG
>persistence.AbstractDBMapper [?] - Method execute called...
>
>any ideas?
>
>kind regards,
>sandro

This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, 
proprietary and/or privileged.  This e-mail is intended only for the 
individual(s) to whom it is addressed, and may not be saved, copied, 
printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your 
computer system and notify the sender.  Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe <at> jakarta.apache.org
For additional commands, e-mail: log4j-user-help <at> jakarta.apache.org


Gmane