当我写日志到 Windows事件日志时: System.Diagnostics.EventLog.WriteEntry("SourceName", a_long_string); 我得到以下例外: Log entry string is too long. A string written to the event log cannot exceed 32766 characters. 然后我
System.Diagnostics.EventLog.WriteEntry("SourceName", a_long_string);
我得到以下例外:
Log entry string is too long. A string written to the event log cannot exceed 32766 characters.
然后我将我的日志消息拆分为2个或更多字符串.但我认为这不是一个好主意.
任何变通方法? (例如extern每个日志条目的限制)