I got it working, woohoo... :)
Thanks for the help. I do have one last question, how would I set up the
appenders so that only info message go to the remoting appender and all
other messages go through another appender? I see how I can set a threshold
but that is the reverse of what I am looking to do. If it's not possible
then no biggie but curious if I could do it. Thanks.


-----Original Message-----
From: Nicko Cadell [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 23, 2004 7:58 PM
To: 'Log4NET User'
Subject: RE: Need help with remoting


Eric,

You will need to write an class that implements the 
log4net.Appender.RemotingAppender.IRemoteLoggingSink interface.

You need to setup a channel to listen on. You can do this either via the
config file or programmatically:

<system.runtime.remoting>
  <application>
    <channels>
      <channel displayName="Server Channel" ref="tcp server" port="8085" />
    </channels>
  </application>
</system.runtime.remoting>

If you specify the above in your .config file you will need to call the
following:
RemotingConfiguration.Configure(AppDomain.CurrentDomain.SetupInformation.Con
figurationFile);

Or you can setup the channel programmatically:

ChannelServices.RegisterChannel(new TcpChannel(8085));


Then you need to publish an instance of your IRemoteLoggingSink class via
remoting:

RemotingServices.Marshal(remoteLoggingSinkInstance, "LoggingSink",
typeof(IRemoteLoggingSink));

That should do it. While your app is running it will receive logging events
via the remoteLoggingSinkInstance object marshalled.

Nicko


> -----Original Message-----
> From: Eric Seifert [mailto:[EMAIL PROTECTED] 
> Sent: 23 May 2004 16:41
> To: '[email protected]'
> Subject: Need help with remoting
> 
> I have been trying to create a client application to capture 
> the remoting log events but haven't been able to. I looked at 
> the sample remoting application that came with log4net but 
> the way I need to do the logging is different than how the 
> sample is setup. 
> I have mutiple web services that I am writing and am creating 
> a logging repository to log all trace messages and errors to 
> a single location. I would like to use remoting to do this 
> since it allows me to do some filtering and real-time viewing 
> of messages on the client end. Can someone point me to a 
> sample that is more real world than the one provided in the 
> samples directory of log4net or at least explain how I need 
> to setup the client sink to receive the messages. Any help is 
> greatly appreciated.
> Thanks,
> Eric
> 

Reply via email to