You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2004/07/30 13:28:59 UTC

DO NOT REPLY [Bug 30407] New: - Externally rolled file problem

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30407>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30407

Externally rolled file problem 

           Summary: Externally rolled file problem
           Product: Log4j
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Other
        AssignedTo: log4j-dev@jakarta.apache.org
        ReportedBy: cagatay.tunali@oksijen.com


I have a serious problem with "ExternallyRolledFileAppender". I configured my 
logger like 
/******************************************************************************
****************************/
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
<appender name="GatewayAppender" 
class="org.apache.log4j.varia.ExternallyRolledFileAppender">
	<param name="File" value="logs/Gateway.log"/>
	<param name="Append" value="true"/>
	<param name="MaxFileSize" value="5000KB"/>
	<param name="MaxBackupIndex" value="10"/>
	<param name="Port" value="3366" />
	<layout class="org.apache.log4j.PatternLayout">
	<param name="ConversionPattern" value="%d{|dd/MM/yy|HH:mm:ss:SSS}|%-
5p|%-10t| : %m%n" />
	</layout>
</appender>
<logger name="GatewayLogger" additivity="false">
	<level value="DEBUG"/>
	<appender-ref ref="GatewayAppender"/>
</logger>
<root>
	<priority value="DEBUG" />
	<appender-ref ref="GatewayAppender" />
</root>
</log4j:configuration>
/******************************************************************************
****************************/
with  xml file. The logger is initialized with this values and reinitialized 
every 60 seconds. But When I try to change the log level
of GatewayLogger (not root logger) in this file
<level value="DEBUG"/> ----------> <level value="WARN"/>
 the program gives these errors.
/******************************************************************************
***************************/
java.net.BindException: Address already in use
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:321)
        at java.net.ServerSocket.bind(ServerSocket.java:308)
        at java.net.ServerSocket.bind(ServerSocket.java:266)
        at java.net.ServerSocket.<init>(ServerSocket.java:182)
        at java.net.ServerSocket.<init>(ServerSocket.java:94)
        at org.apache.log4j.varia.HUP.run
(ExternallyRolledFileAppender.java:110)
/******************************************************************************
***************************/



Another problem that I face with log4j is I will both change the log level in 
xml file and manually in my program. But when I change the debug level from 
program (set to WARN); because xml file (in xml file debug level is INFO) does 
not modified, dom configurator does not refresh debug level value. I think, 
because the values of current log level and xml log level does not match it 
must be reconfigured.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org