New Posts New Posts RSS Feed: Intercepting messages being written to DebugLog.xml in BOS
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Intercepting messages being written to DebugLog.xml in BOS

 Post Reply Post Reply
Author
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Topic: Intercepting messages being written to DebugLog.xml in BOS
    Posted: 11-Jun-2008 at 7:47am
You can directly create an instance of IdeaBlade.Util.TraceSubscriber, and then subscribe to its Publish event.  We have two concrete implementations of the TraceSubscriber based on the communications technology choice:  Remoting or WCF.  We use the TraceSubscriber in both the TraceViewer and the debug log, so you'd effectively be doing the same thing we are. 
 
I'm not sure how well we've documented all this, so here's a little bit to get you started:
 
// Creates either WCF or Remoting instance based on IdeaBladeConfig.
// Overloads are available, or construct the concrete class directly.
_traceSubscriber = TraceSubscriber.CreateInstance();  
 
// The publish handler will be where you take the trace message and log to your own logs.
_traceSubscriber.Publish += PublishHandler;
_traceSubscriber.SubscriptionError += SubscriptionErrorHandler;
 
// This is overloaded - I'm not sure which you'd need.
_traceSubscriber.StartSubscription(url);
 
// You can issue this when done.
_traceSubscriber.StopSubscription();
 
 
Back to Top
pnschofield View Drop Down
Newbie
Newbie
Avatar

Joined: 14-Sep-2007
Location: United States
Posts: 18
Post Options Post Options   Quote pnschofield Quote  Post ReplyReply Direct Link To This Post Posted: 10-Jun-2008 at 1:49pm
We've implementing the Enterprise Library Logging Application Block in our PersistenceManager implementation so that we can perform server-side logging.  We'd like to be able to log messages that the IdeaBlade framework is currently writing to the DebugLog.xml file to our own logs.  I've seen the documentation on the TracePublisher/Subscriber classes, but they seem to be designed for passing trace messages from the server to a client; we just need to see the trace messages on the server as they happen.

Any suggestions?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down