Thanks

Attached is my log4 config file



Maor Bril
SW  Engineer, QA Department
Allot Communications • a mind for networks™
Tel: +972 9 7619 263
Cell: +972 52 5600699
Fax: +972 9 744 3626
[email protected]
www.allot.com



-----Original Message-----
From: Amit Oberoi [mailto:[email protected]] 
Sent: Sunday, April 17, 2011 11:10 AM
To: [email protected]; Maor Bril
Subject: RE: NULL's in log

How does your Logger configuration looks like. I presume the problem is the way 
you are initiating/ declaring your Logger.

Regards

Amit Oberoi

Sent from my Nokia E72.
-----Original message-----
From: Maor Bril
Sent:  17/04/2011, 13:26
To: [email protected]
Subject: NULL's in log
Hi All

 

 

Every once in a while I get a corrupted log file with a very long sequence on 
NULL's where the text should be

 

 

This happens once in 3-4 days on sporadic occasions.

 

 

I use a static synchronized class for all the threads who want to write to the 
log file access

 

This is due to the fact I need to output the message to a GUI screen as well.

 

Both the methods and the actual access to the log are synchronized.

 

Example

 

public static synchronized logOut(Object message) {

 

      synchronized(log) {

 

           log.info(message)

 

     }

 

  // Do other stuff with message.

 

}

 

Please advise..,. as the NULL's renders the system unreliable.

 

Regards, 

 

Maor

 

 

 

Maor Bril
SW  Engineer, QA Department

Allot Communications * a mind for networks(tm)
Tel: +972 9 7619 263
Cell: +972 52 5600699
Fax: +972 9 744 3626
[email protected] <mailto:[email protected]> www.allot.com <http://www.allot.com/> 

 

 


##############################################################################################
This message is intended only for the designated recipient(s).It may contain 
confidential or proprietary information.
If you are not the designated recipient, you may not review, copy or distribute 
this message.
If you have mistakenly received this message, please notify the sender by a 
reply e-mail and delete this message. 
Thank you.
##############################################################################################

============================================================================================================================Disclaimer:
  This message and the information contained herein is proprietary and 
confidential and subject to the Tech Mahindra policy statement, you may review 
the policy at <a 
href="http://www.techmahindra.com/Disclaimer.html";>http://www.techmahindra.com/Disclaimer.html</a>
 externally and <a 
href="http://tim.techmahindra.com/Disclaimer.html";>http://tim.techmahindra.com/Disclaimer.html</a>
 internally within Tech 
Mahindra.============================================================================================================================

##############################################################################################
This message is intended only for the designated recipient(s).It may contain 
confidential or proprietary information.
If you are not the designated recipient, you may not review, copy or distribute 
this message.
If you have mistakenly received this message, please notify the sender by a 
reply e-mail and delete this message. 
Thank you.
##############################################################################################
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";>

	<appender name="log-file" class="org.apache.log4j.RollingFileAppender">
		<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
		<param name="File" value="log/automation-log.log" />
		<param name="Append" value="false" />
		<param name="MaxFileSize" value="10000KB" />
		<param name="MaxBackupIndex" value="10"></param>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="[%d] KEYBLOCK %-5p: (%t:%c:%L) - %m%n" />
		</layout>
	</appender>
	<appender name="runlog-file" class="org.apache.log4j.RollingFileAppender">
		<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
		<param name="File" value="log/automation-runlog.log" />
		<param name="Append" value="false" />
		<param name="MaxFileSize" value="50000KB" />
		<param name="MaxBackupIndex" value="5"></param>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%m%n" />
		</layout>
	</appender>
	<appender name="file" class="org.apache.log4j.AsyncAppender">
		<param name="LocationInfo" value="true" />
		<appender-ref ref="log-file" />
	</appender>
	<appender name="runlog" class="org.apache.log4j.AsyncAppender">
		<param name="LocationInfo" value="true" />
		<appender-ref ref="runlog-file" />
	</appender>
	<logger name="com.allot.QaAutomation">
		<level value="INFO" />
		<appender-ref ref="file" />
	</logger>
	<logger name="runlog">
		<level value="INFO" />
		<appender-ref ref="runlog" />
	</logger>
	<root>
		<level value="INFO" />
		<appender-ref ref="file" />
	</root>
</log4j:configuration>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to