错误,事件,警告和信息日志创建 [英] Error, Event, Warning and information Log creation

查看:74
本文介绍了错误,事件,警告和信息日志创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开发人员,


在我的应用程序中,我正在为文本文件中的每个进程创建错误日志,事件日志,警告日志和信息日志.

现在,我编写了一个函数来写文件,每次都在调用:((..
但是代码变得如此之大.有没有优化此代码的选项??

问候,
Nanda

Hi developers,


In my application I am creating Error log, Event log, Warning log and information Log for every process in text file.

Now I written a function to file write and I am calling every time :(( .
But code is become so large. Is there any option to optimize this code???

Regards,
Nanda

推荐答案

看看过去的讨论是否对您有帮助,我为自定义事件日志提供了一个有用的类:如何在文件夹下创建事件日志 [
See if the past discussion can help you, I offer a useful class for custom event log: MsBuild OutPut to the TextBox on the fly in Windows Application[^].

Another Answer provides a class to log into the System Log with custom node: How to create event log under a folder[^].

Yes, I know it''s C#, sorry. If you demand code samples in VB.NET only you won''t get much, so understanding at least some C# is really good if you do .NET development.

—SA


这篇关于错误,事件,警告和信息日志创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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