2

I'm using Ent Lib 5, and I need to be able to update the databaseInstanceName property of Microsoft.Practices.EnterpriseLibrary.Logging.Database.FormattedDatabaseTraceListener listener.

The databaseInstanceName is defined in my app.config, but I need to set it dynamically.

I've looked into using Fluent Configuration, but I didn't see a way to edit a listener.

Is there any way to change a listener's configuration at run time?

Thanks!

Bret Walker
  • 1,796
  • 5
  • 20
  • 41

1 Answers1

0

Just write to the configuration file programatically, the file is monitored by the EL and it should notice the change and start logging the the new location automatically.

Stephen Turner
  • 7,125
  • 4
  • 51
  • 68