I am creating a design pattern for non developers and I am incorporating a catch all error handler with the UnhandledException event. I’d like to write the error out to a log file but the log file name has a time stamp in it, so it will change with each run. Is there a way my handler can receive or access the log file name string?
Thanks for any help
Usually the UnhandledException event handler is located in the class that contains your startup code. So there is nothing to prevent you to define a shared public variable in this class that contains the name of your logfile. You could initialize its value at startup reading from a configuration file. Then inside the event is possible to use that variable to open your log file and write your information
EDIT: in your scenario you could try this pseudocode
and in your intial form add this call to define the logName