You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by CAGATAY TUNALI <ca...@oksijen.com> on 2004/07/29 11:08:44 UTC

Externally rolled fil problem

Hi,

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.
Yours Sincerely.


Ahmet Çağatay Tunalı
-------------------------------------------------------------------------------------
Software Engineer
Oksijen Technology
GSM:0 543 502 24 54
VPN:2454
Direct Phone:0 212 448 87 68
Internal Phone:8768
e-mail:cagatay.tunali@oksijen.com
-------------------------------------------------------------------------------------
The information contained in this message is confidential, intended solely for the use of the individual or entity to whom it is addressed and may be protected by professional secrecy. You should not copy, disclose or distribute this information for any purpose. If you are not the intended recipient of this message or you receive this mail in error, you should refrain from making any use of the contents and from opening any attachment. In that case, please notify the sender immediately and return the message to the sender, then, delete and destroy all copies. This e-mail message has been swept by anti-virus systems for the presence of computer viruses. In doing so, however, we cannot warrant that virus or other forms of data corruption may not be present and we do not take any responsibility in any occurrence. 

------------------------- 

Bu e-posta mesajı kişiye özel olup, gizli bilgiler içeriyor olabilir. Eğer bu e-posta mesajı size yanlışlıkla ulaşmışsa, e-posta mesajını kullanıcıya hemen geri gönderiniz ve mesaj kutunuzdan siliniz. Bu e-posta mesajı, hiç bir şekilde, herhangi bir amaç için çoğaltılamaz, yayınlanamaz ve para karşılığı satılamaz. Yollayıcı, bu e-posta mesajının - virüs koruma sistemleri ile kontrol ediliyor olsa bile - virüs içermediğini garanti etmez ve meydana gelebilecek zararlardan doğacak hiçbir sorumluluğu kabul etmez. 

------------------------- 

Oksijen Teknoloji http://www.oksijen.com