logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ing. Slavomir Dvorsky" <dvor...@host.sk>
Subject Telnet appender problem on configuration file change
Date Wed, 20 Oct 2004 06:23:00 GMT
Hello
I have little problem with TelnetAppender.


Description of situation :
- I am using TelnetAppender (and some others ..)
- Log4cxx is configured by "log4cxx::PropertyConfigurator::configureAndWatch(...)"
  it means that configuration file is watched without need to restart application.
- at the bottom of the mail is example of Log4cxx configuration file.
- system is WindowsXP

PROBLEM:
On configuration file change the TelnetAppender doesnot work anymore ...
Log4cxx prints on console following :
" Encountered error while in SocketHandler loop."
" Blocking operation was canceled calling WSACancelBlockingCall."
(second sentence is not exact translation because of Czech language of windows)

When I don't use TelnetAppender everything works fine 
(ie. new configuration is re-read and Loggers are reconfigured).

When I use TelnetAppender in configuration file ... TelnetAppender 
works only on application start, but not on configuration change.

Note:
I have found in log4cxx archive that this problem with TelnetAppender
was solved in Log4cxx 0.1.0

regards
slavo dvorsky



---------------------------------------------
Configuration file digest follows :

################################################################################
# ROOT LOGGER AND PHS LOGGERS
################################################################################
## default logging level for PHS syatem and default logger name
#log4j.rootLogger = DEBUG, A_file_phs
log4j.rootLogger = DEBUG, A_file_phs, A_debug_telnet_phs



################################################################################
# APPENDER : A_debug_telnet_phs
################################################################################
# To monitor logged events, use "putty.exe"
# Putty connection info is : 192.168.2.16:6676
#	IP: 192.168.2.16
#	PROTOCOL: telnet
#	PORT: 6676
# NOTE:
#	After "phs_log4cxx.conf" change, the telnet connection is lost ...
#	It means that LogServer MUST be restarted.
#	Possible reason is that the TelnetAppender cannot reconnect at the same port.
log4j.appender.A_debug_telnet_phs=org.apache.log4j.TelnetAppender
log4j.appender.A_debug_telnet_phs.port=6676
log4j.appender.A_debug_telnet_phs.layout=org.apache.log4j.PatternLayout
log4j.appender.A_debug_telnet_phs.layout.ConversionPattern=%d [%t] %-5p %c - %m







Mime
View raw message