Hi all,
I have the following app.config file:
<?
xml version="1.0" encoding="utf-8" ?>
<
configuration>
<
system.diagnostics>
<
sources>
<!--
This section defines the logging configuration for My.Application.Log -->
<
source name="DefaultSource" switchName="DefaultSwitch">
<
listeners>
<
add name="FileLog"/>
<!--
<add name="EventLog"/> -->
</
listeners>
</
source>
</
sources>
<
switches>
<
add name="DefaultSwitch" value="Information" />
</
switches>
<
sharedListeners>
<
add name="FileLog"
type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
initializeData="FileLogWriter"
location="custom"
traceooutputoptions="DateTime"/>
<!--
<add name="EventLog"
type="System.Diagnostics.EventLogTraceListener"
initializeData="ArciveSpooler"/>
-->
</
sharedListeners>
</
system.diagnostics>
</
configuration>
The 'location' and 'traceoutputoptions' are underlined are they raise an error when running. Can I remove them, because I'm doing the following in code:
'Initialize file log
MyFileLog =
My.Application.Log
With MyFileLog.DefaultFileLogWriter
.Append =
True
.BaseFileName =
"ArciveSpooler"
.CustomLocation =
My.Application.Info.DirectoryPath
.Delimiter = vbTab
.DiskSpaceExhaustedBehavior = DiskSpaceExhaustedOption.DiscardMessages
.IncludeHostName =
True
.TraceOutputOptions = TraceOptions.DateTime
Or TraceOptions.ProcessId Or TraceOptions.ThreadId
End With
Regards,
Ivan