Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找一种方法来限制 SmtpAppender 以限制在定义的时间跨度内多次发生相同错误的情况下发送的电子邮件数量。
我不知道这是否可能,任何帮助将不胜感激
我没有尝试过这个扩展的 SMTP 附加程序,但它似乎是你需要的。
http://mail-archives.apache.org/mod_mbox/logging-log4net-user/200804.mbox/%3C6D3CA9B0BEA31640B4E6338360C847400223ECCB@entdc1ms02.corp.gomez.com%3E
您总是可以扩展SmtpAppender以实现您需要的功能。
SmtpAppender
喜欢这个示例帖子。