I'm trying to get fluent configuration working without success. I get the following error:
Activation error occured while trying to get instance of type LogWriter, key ""
when I try to access the logwriter:
Dim logwriter As LogWriter = EnterpriseLibraryContainer.Current.GetInstance(Of LogWriter)()
Configuration:
Dim formatBuilder As New FormatterBuilder()
Dim builder As New ConfigurationSourceBuilder()
builder.ConfigureInstrumentation().EnableLogging()
builder.ConfigureLogging.LogToCategoryNamed("Important") _
.WithOptions.SetAsDefaultCategory() _
.SendTo.RollingFile("StandardListener") _
.RollEvery(RollInterval.Midnight) _
.RollAfterSize(50000) _
.WhenRollFileExists(RollFileExistsBehavior.Increment) _
.FormatWith(formatBuilder.CustomFormatterNamed("StandardFormatter", GetType(StandardFormatter))) _
.ToFile("D:\LogFiles\" + fileName)