Hi i try to Log error codes like in Log4Net
$logger.Error(3, "Converting task invocator's config file failed, exiting...")
If this error occurs it logs only the Error code "3" but not the message. it Looks like it takes the Error code as text und drops the message it self.
EventLog --> [TaskV1] (Automation_TaskInvocator.ps1 - 1.0.0.0) [] [ERROR] 3 --> message is missing Same problem with Database and file.
the question is how i can handle that. it should takes the error Code as INT and the Message as text. I don't want to go over my hundreds of lines of code to add the error code to the message. especially since I have an extra column for the error codes in the database.
Hope someone can bring me on the right way
thanks a lot
With best regards