EventLogAppender write only my app events

How to config EventLogAppender for write only events from my app. Because, currently I have next configuration:

    var elAppender = new EventLogAppender
                         {
                             ApplicationName = "My App",
                             LogName = "My Log",
                             Layout = new PatternLayout(default_format),
                             Threshold = Level.Error
                         };
    elAppender.ActivateOptions();

and in My Log present all messages from the all applications like Application, bu I need events only from My App. Thank you.

Answers


You could create a filtered view within Event Viewer. This way, you don't need to change your application.


I found solution :),

I recreated my appender without spaces in the name and everything worked :) the code like this:

var elAppender = new EventLogAppender
                         {
                             ApplicationName = **"MyApp"**,
                             LogName = **"MyLog"**,
                             Layout = new PatternLayout(default_format),
                             Threshold = Level.Error
                         };
    elAppender.ActivateOptions();

Need Your Help

Last-Modified not working for .htaccess

apache .htaccess header http-headers httpd.conf

I'm tyring to implement browser caching and follow Google PageSpeed's recommendation about setting Last-Modified to a data that is "sufficiently far enough in the past." I have the following in my .

Get image name UIImagePickerController in Swift

ios iphone xcode swift uiimageview

I use UIImagePickerController to get image from phone library (iOS). After edit mode i put image to my UIImageView.