All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
用C#压缩和修复Access数据库_[Asp.Net教程]
ASP.NET中生成条形码_[Asp.Net教程]
掌握AJAX之AJAX通讯技术简介_[AJAX教程]
ASP.NET2.0数据操作之创建数据访问层(2)_[Asp.Net教程]
delphi类的多态性
SQL,Server,2005升级的十个步骤详解_[SQL,Server教程]
PHP中多张图片上传并校验的实现_[PHP教程]
怎么将现有的网站过渡到XHTML_[Html教程]
网页实例:详细介绍用PHP来编写网页记数器_php资料_编程技术
用PHP控制您的浏览器cache_[PHP教程]
Reading number is top 10 pictures
Ashlynn Brooke a group sexy photo2
Ashlynn Brooke a group sexy photo4
重口味人造肉
Female model behind the bitterness, often being overcharged3
Chinese paper-cut grilles art appreciation4
Sora aoi possession of boudoir1
The money of more than 100 countries and regions7
Wild animals melee moment of life and death2
The real super beauty7
Terrorist smile the largest human history an explosion1
Download software ranking
Boxer Classic video1
Ashlynn Video3
Unix video tutorial2
Tram sex maniac 2 (H) rar bag7
Sora aoi, the nurse, uniform ,nursing assistant
变速齿轮3.26
仙剑奇侠传98硬盘WINXP版
matrix3
Tram sex maniac 2 (H) rar bag4
WebService在.NET中的实战应用教学视频 → 第3集
delv published in(发表于) 2014/1/16 9:29:36 Edit(编辑)
c#写系统日志_[Asp.Net教程]

c#写系统日志_[Asp.Net教程]

c#写系统日志_[Asp.Net教程]


using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;

namespace Log
{
class LogWirter
{
///


/// 事件源名称
///

private string eventSourceName;
EventLogEntryType eventLogType;
public LogWirter()
{
eventSourceName = "test";
eventLogType = EventLogEntryType.Error;
}


///


/// 消息事件源名称
///

public string EventSourceName
{
set { eventSourceName = value; }
}


///


/// 消息事件类型
///

public EventLogEntryType EventLogType
{
set { eventLogType = value; }
}


///


/// 写入系统日志
///

/// 事件内容
public void LogEvent(string message)
{
if (!EventLog.SourceExists(eventSourceName))
{
EventLog.CreateEventSource(eventSourceName, "Application");
}
EventLog.WriteEntry(eventSourceName, message, EventLogEntryType.Error);
}
}
}


来源:网络







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.