Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

On an ASP NET project (C#) I'm using the System.Diagnostics namespace to log errors, warning and information. Using Windows 7 I see that the log I've set for the project is under "Applications and Services Logs". How can I set in code to create a folder and put it under "Applications and Services Logs[SOME FOLDER]Applications and Services Logs", for examples?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
308 views
Welcome To Ask or Share your Answers For Others

1 Answer

The logs stored in the Applications and Services Log section are the logs of custom event publishers as opposed to simple Windows Event Logs.

From this article Technology Summary for Reading and Managing Event Logs:

Applications and Services logs are a different category of event logs than the Windows Logs. The Applications and Services logs store events from a single application or component rather than events that might have system-wide impact. They have a variety of names that are defined by event providers.

Thus, you would need to create a custom Event Publisher. Here are a couple of articles with more information:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...