Hi!      (Using Visual Age 3.5 on NT)

I use SocketAppender and listen with SocketServer which logs to a file. It 
works well. But now I want to log to several files on server, depending on 
which "client group" that want to log.

I use the SocketAppender in the following prop. config file (Trace1.lcf):

log4j.rootCategory=DEBUG, SOCKETSERV

log4j.category.org.apache.log4j.net=DEBUG
log4j.appender.SOCKETSERV=org.apache.log4j.net.SocketAppender
log4j.appender.SOCKETSERV.RemoteHost=localhost
log4j.appender.SOCKETSERV.Port=9991


I do the following in a method everytime to send messages to the socket:
  PropertyConfigurator.configure("C:\\Trace1.lcf");

  Category cat = Category.getInstance("SOCKETSERV");

  cat.info("Tracing" + message);

Is this the right way to do so?


I have the following prop. config file (localhost.lcf) stated in 
SocketServer second argument in main():

  log4j.rootCategory=debug, A1

  log4j.appender.A1=org.apache.log4j.RollingFileAppender
  log4j.appender.A1.File=C:\\localhost.log

  log4j.appender.A1.MaxFileSize=1000KB
  # Keep one backup file
  log4j.appender.A1.MaxBackupIndex=5

  log4j.appender.A1.layout=org.apache.log4j.PatternLayout
  log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss.SSS} - %m%n%n


Every "client group" have to have a logfile that only belongs to that group.

How can I log to diffent files in SocketServer, one for each "client group"?

Do I have to have several SocketAppenders stated in my config file, one for 
each "client group"?

Please...Help me...Don't hesitate to contact med directly.

/Atte
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to