Avatar of sevzas
Flag for United States of America

asked on 

Custom Logging with FileLogTraceListener and My.Application.Log

I'm trying to programmatically set up logging to a text file using FileLogTraceListener.  I do not want to use app.config - everything needs to be done programmatically because the location and the name of the log are determined at runtime based on command line arguments.

So I create a new FileLogTraceListener instance and set some attributes on it.  Now I have a fully configured FileLogTraceListener but I cannot figure out how to register it so it works with My.Application.Log.writeEntry()
Can you help?
.NET ProgrammingVisual Basic Classic

Avatar of undefined
Last Comment

8/22/2022 - Mon