惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
The Register - Security
The Register - Security
量子位
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
MyScale Blog
MyScale Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
Jina AI
Jina AI
博客园 - 【当耐特】
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
有赞技术团队
有赞技术团队
T
Tor Project blog
H
Hacker News: Front Page
A
Arctic Wolf
NISL@THU
NISL@THU
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
V
V2EX
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
I
InfoQ
D
Docker
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42

博客园 - 冰冷

经典正则表达式 (转) 常用的javascript小技巧[作者oror][转] HR 事务代码 (转) rp-provide-from-last 给SAP系统安装联机帮助(事务码SR13) (转) - 冰冷 - 博客园 如何修改 SAP 登录后的背景图片(事务码 SMW0,SM30)(转) 导出txt文件简单的例子 sapgui640免除每次登录都要输入密码(转) 关于MiPlatform310 关于oracle form开发中commit WHEN-VALIDATE-ITEM 和 KEY-NEXT-ITEM两个trigger 的先后顺序 vs2005中的treeview VS2005 写存储过程 关于给winform的DataGrid中添加复选框的问题 用.NET创建windows服务 google中的超强搜索 关于FAT32 -> NTFS 文件系统转换 数据库连接字符串大全 [TrackBack] 转自CSDN 地址:http://blog.csdn.net/gauss32/archive/2004/10/27/154621.aspx 关于配置证书服务器,和自己颁发企业证书
自动日志组件 - Log4net应用(转贴来自http://dotnet.3yee.com/)
冰冷 · 2004-06-14 · via 博客园 - 冰冷

log4net与log4j分别是for dotnet 与 for java的一双log记录组件姐妹,许多开源项目都用它们来记录系统日志,使用非常方便:

   将log4net.dll加入到项目中,然后使用

public class AreaImpl
 {
  private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(AreaImpl));

  public AreaImpl()
  {
  }

  public void AddArea(Area area)
  {
   ISession s = HibernateUtil.OpenSession();
   ITransaction t = s.BeginTransaction();
   try
   {
    s.Save(area);
    t.Commit();
    log.Info("Save " + area.ToString() + " ...OK");
   }
   catch(Exception e)
   {
    t.Rollback();
    log.Error("Save " + area.ToString() + " ...Failed!", e);
    throw e;
   }
   finally
   {
    s.Close();
   }
  }