如何创建一个eventlog SUB文件夹 [英] How to create an eventlog SUB Folder

查看:105
本文介绍了如何创建一个eventlog SUB文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Windows 7的C#应用​​程序"MyApp"中使用Windows Eventlogging.我的应用程序"由不同的项目/组件组成.我希望每个组件都在我的应用程序"文件夹下的Eventviewer中的不同文件夹下进行记录.

所以我的事件查看器看起来像这样:

EventViewer \ Application&服务日志\ MyApp \组件\ ...

我知道这个话题一直在讨论:

如何在文件夹下创建事件日志 [ ^ ]

但是,我认为核心问题尚未得到解答.就像我的一样,最初的问题是如何管理事件日志的结构.

例如,请查看应用程序和应用程序"中的"MicroSoft"条目.服务日志,它具有Windows的子条目.

任何帮助将不胜感激.

I''d like to use Windows Eventlogging in my C# application "MyApp" on Windows 7. "My App" consists of different projects / components. I want each Component to log under a different folder in Eventviewer under the "My App" folder.

So my eventviewer looks like this:

EventViewer \ Application & Services Logs \ MyApp \ Component \ ...

I know a similair discussion has been in this thread:

How to create event log under a folder[^]

However the central question has NOT been answered I think. The original question, just like mine is how to manage the structure of eventlog.

For example look at the MicroSoft entry in Application & Services logs, it has a subentry for Windows.

Any help will be much appreciated.

推荐答案

此处有关于此的MSDN文章:

http://msdn.microsoft.com/en -us/library/system.diagnostics.eventlog.createeventsource(v = vs.71).aspx
There is an MSDN article about this here:

http://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog.createeventsource(v=vs.71).aspx


这篇关于如何创建一个eventlog SUB文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆