SemanticLoggingEventSource.Log.CustomSinkUnhandledFault - where do these go?

Topics: Semantic Logging Application Block
Aug 20, 2014 at 9:03 PM
Can anybody tell where do these messages go? I mean where can I find these messages?

I use it in EmailSink which is described in Ent lib dev guide.
Aug 21, 2014 at 4:48 AM
Events from SemanticLoggingEventSource go where ever you tell them to go. ;)

By default they are not logged but logging can be enabled on the SemanticLoggingEventSource just like your custom (or any other) EventSource.
ObservableEventListener listener = new ObservableEventListener();
listener.EnableEvents(SemanticLoggingEventSource.Log, EventLevel.LogAlways, Keywords.All);
listener.LogToFlatFile("slab.txt");
~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to
Marked as answer by alvipeo on 8/26/2014 at 8:05 AM
Aug 21, 2014 at 4:50 PM
Thanks! I guess I should be asking another question :)

BTW, LogToFlatFile causing problems when mvc project get deployed to Azure Websites. Every time I try to deploy with the option 'delete all files on target' on (or whatever it's called) I get an error - the file log.txt is locked by some process so the deployment failed. The same happens when I try to deploy to a regular server.
Aug 22, 2014 at 5:28 AM
The Semantic Logging Block locks the log files itself. So, as long as the site is running the file will be locked. You could switch from using a file based sink to the Azure table sink to avoid the locking issue. Another approach would be to deploy to a deployment slot and then do a swap. Or some other mechanism (e.g. stop the site) to disable logging and release the log file locks before publishing (although this is not that practical).

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to