Zon-cpp asked:
by EventLog, can i specify a special path beside the exe file?
Who told you that the "path" is "exe file". This is not how it works.
You can customize
EventLog
to change the sink of data, to make it a file or anything else, but I would recommend to use default behavior. To understand how, please see my past answer:
MsBuild OutPut to the TextBox on the fly in Windows Application[
^].
Even if you use default sink, system event log, to be viewed by the standard Event Log viewer, you can register (and later unregister) your custom event source, to have your events stored in a separate application-specific node of the event tree. Please see my past answer:
How to create event log under a folder[
^].
—SA