Custom sink Out-of-process

Topics: Semantic Logging Application Block
Jan 31, 2014 at 9:20 PM
I have created my own custom sink which inherits from the IObserver<EventEntry> class. This works fine for in-process logging. I want to use this with the out-of-process service. I cannot get this to work.

What do I have to do to use custom sinks in a out-of-process service?

Thanks for your help Damien
Feb 3, 2014 at 2:44 AM
It sounds like you should just be able to edit the configuration file to add a customSink element to the config file with your type information (and parameters if necessary).

<customSink name="SimpleCustomEmailSink"
  type ="CustomSinkExtension.EmailSink, CustomSinkExtension">
    <eventSource name="MyCompany" level="Critical" />

The Developer's Guide gives some good examples of Creating Custom Sinks including both in and out-of-process scenarios.

Randy Levy
Enterprise Library support engineer
Support How-to
Feb 3, 2014 at 7:55 AM
Thanks for your reply.

I found my problem. The Developer's Guide documentation example doesn't work for the Email sink.

The IEventTextFormatter formatter must be defined in the Out-Of-Process sink configuration for this to work. Or if the Email sink class has a constructor without the IEventTextFormatter formatter, the customSink xml in the documentation will also work.

Thanks for your help

greetings Damien