Windows EventLog cannot exceed 32766 characters

DiomyDayday

New Member
when i write log to windows eventlog:\[code\]System.Diagnostics.EventLog.WriteEntry("SourceName", a_long_string);\[/code\]i got the following exception:\[quote\] Log entry string is too long. A string written to the event log cannot exceed 32766 characters.\[/quote\]then i splits my log message into 2 or more string. but i don't think it is a good idea.any workarounds? (such as extern the limit per log entry)
 
Top