siv99 | 8 Feb 23:42
Picon
Gravatar

log4j:ERROR Could not parse file


Hi,
   I am trying to use log4j in my application and i am getting following
error. Thanks a lot for the help in advance.

log4j:ERROR Could not parse file [nullWEB-INF/logging/log4j.xml].
java.io.FileNotFoundException:
/app/ENP/user_projects/domains/Domain2/nullWEB-INF/logging/log4j.xml (No
such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
        at
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
        at java.net.URL.openStream(URL.java:1010)
        at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2650)
        at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:253)
        at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:222)
        at
oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:155)
        at
weblogic.xml.jaxp.RegistryDocumentBuilder.parse(RegistryDocumentBuilder.java:163)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:208)
        at
org.apache.log4j.xml.DOMConfigurator$1.parse(DOMConfigurator.java:749)
        at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:866)
        at
(Continue reading)

Ricardo Oliveira | 2 Feb 10:24
Picon
Gravatar

ExpressionFilter in log4j.properties

Hello,

Is there any way to configure expression filters in log4j.properties or we need to use log4j.xml?

Cheers,

--Ricardo
Jonathan Rosenberg | 28 Jan 21:27
Favicon
Gravatar

SMTPAppender Problems

I am trying to set up logging via email.  Here is the relevant parts
of my log4j.xml

	<appender name='severe' class='org.apache.log4j.net.SMTPAppender'>
		<param name='SMTPDebug' value='true' />
    	<param name='To' value='XXXX <at> tabbysplace.org' />
    	<param name='From' value='XXXX <at> tabbysplace.org' />
    	<param name='SMTPHost' value='tabbysplace.org' />
    	<param name='SMTPPort' value='25' />
     	<param name='SMTPUsername' value='XXXX <at> tabbysplace.org' />
    	<param name='SMTPPassword' value=',XXXXXX' />
    	<param name='Subject' value='CAS Sever Error' />
    	<param name='bufferSize' value='1' />
    	<layout class='org.apache.log4j.PatternLayout'>
    		<param name="ConversionPattern" value='%d{[ dd.MM.yyyy
HH:mm:ss.SSS]} [%t] %n%-5p %n%c %n%C %n %x %n %m%n' />
    	</layout>
 		<filter class="org.apache.log4j.varia.LevelRangeFilter">
    		<param name="LevelMin" value="error" />
    		<param name="LevelMax" value="fatal" />
  		</filter>
 	</appender>
    <logger name='org.tabbysplace.sso' additivity='true'>
    	<level value='FATAL' />
    	<appender-ref ref='severe' />
    </logger>
    <logger name='org.tabbysplace.sso' additivity='true'>
    	<level value='INFO' />
    	<appender-ref ref='cas' />
    </logger>
(Continue reading)

Stadelmann Josef | 26 Jan 13:37
Picon

Configuration Sequence

I have a simpel question :

what is the prioper sequence in configuring log4j.properties

1.	logger
2.	additivity
3.	appenders
4.	filters

to reach that all gets parsed but not twice, 

if sequences are not correct, I see errors such as, in case of a rolling
file appender
file locked by another user, or in case of a Chainsaw sockethuappender,
socket 
address already in use.

What is the rule of dumb in configuration when tomcat startsup and has
to deploy / lauch axis2.war

Josef

rhaiger | 23 Jan 20:45
Picon
Gravatar

Problems with log4j configuration


Hello guys, I'm new in this forum and I think you may help me with an
issue...

I'm trying to use log4j to log some login auditing informations, and I'm
using JBoss 4 and Java with compliance level 5.0. It's a very old legacy
system...

I've added this lines at my log4j.xml:

<appender name="AUDITOR"
class="org.jboss.logging.appender.RollingFileAppender">
    <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>

    

    
    <layout class="org.apache.log4j.PatternLayout">

    </layout>	    
</appender>

<category name="com.itautec.siac.controleAcesso" additivity="false">
    <priority value="INFO"/>
    <appender-ref ref="AUDITOR"/>
</category>

And in my Foo.java class, I've added this field:

private static final Logger logger = Logger.getLogger(Foo.class);
(Continue reading)

Umesh Paliwal | 17 Jan 06:37
Picon

RE: redirecting Stdout and stderr to a different log file

Can anyone help me on the issue below.  Please

From: Umesh Paliwal
Sent: Tuesday, January 10, 2012 9:47 AM
To: 'log4j-user <at> logging.apache.org'
Subject: redirecting Stdout and stderr to a different log file

Hi All,

We have lot many sysouts in our project. The sysout are captured in file by using a redirect operator when we
launch the server.
The maintanence of the files a big issue as these logs keep on growing.

Can you please help me find out a strategy if I can redirect all the sysout and stderr into a logging file using log4j.

Thanks and regards,
Umesh Paliwal
The information contained in this e-mail is private & confidential and may also be legally privileged. If
you are not the intended recipient, please notify us, preferably by e-mail, and do not read, copy or
disclose the contents of this message to anyone.
BRUNO MELLONI | 11 Jan 23:56

Log4j and Java7/JDBC4.1's CommonDataSource.getParentLogger()

Just upgraded from Java 6 to Java 7 and got a nasty surprise.

I have a class that extends from JDBC's AbstractDataSource.  Java 7/JDBC4.1 requires implementing  the
abstract method getParentLogger() from CommonDataSource.  The method returns a
java.util.logging.Logger, but I use log4j.

I imagine that this problem has been encountered before and solved.

What is the best practice solution?

Umesh Paliwal | 10 Jan 05:16
Picon

redirecting Stdout and stderr to a different log file

Hi All,

We have lot many sysouts in our project. The sysout are captured in file by using a redirect operator when we
launch the server.
The maintanence of the files a big issue as these logs keep on growing.

Can you please help me find out a strategy if I can redirect all the sysout and stderr into a logging file using log4j.

Thanks and regards,
Umesh Paliwal
The information contained in this e-mail is private & confidential and may also be legally privileged. If
you are not the intended recipient, please notify us, preferably by e-mail, and do not read, copy or
disclose the contents of this message to anyone.
Anjib Mulepati | 9 Jan 18:24
Picon
Gravatar

log4j in two different project

I have two different projects
a) One for my DAO and
b) Another for my web application.
Web application uses the DAO jar file to handle all DAO operations.
In both project I have configured the log4j.properties (lo4j-1.2.14)
file and using commons-logging 1.1.1.
When I run test code independently in DAO project I can see the log but
when I try to see the log for DAO by running my application DAO logs are
not generated I can only see the logs from my web application.
What I am doing wrong?
Beer Dr. Thomas | 9 Jan 12:04
Picon
Favicon

Asynchronous Logging in Glassfish using log4j.AsyncAppender

Hello,
we would like to use Log4J's "AsynchAppender" within our JEE application. The application is deployed on a
Glassfish V2 app-server.
Log4J's "AsynchAppender" is based on a thread implementation. Threads in turn should be avoided within
JEE applications. Are there any experiences using the "AsynchAppender"? What are best practices doing
asynchronous logging using Log4J in JEE applications?

I really appreciate your help.

Kind regards,
Thomas
indomie15 | 9 Jan 09:31
Picon

Log4J DailyrollingFileAppender Issue


Hi All,

I have two programs that will run concurrently to write logs into the same
log file. I am using log4j-1.2.16.jar and place log4j.xml inside my
application .jar file.

The two programs will write logs into the file for 5 minutes and I am using
DailyRollingFileAppender to rolled the log files every minutes. The problem
is the log file is not rolled over and encounter error message "failed to
rename the file...". Why is it so? 

But when I run one program only, everything is fine.

Does Log4j's DailyRollingFileAppender does not support more than one
application that run simultaneosly to log file into same destination? 

Thank you.

:D
--

-- 
View this message in context: http://old.nabble.com/Log4J-DailyrollingFileAppender-Issue-tp33105755p33105755.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

Gmane