>
> Got it working with these changes
>
BINGO! It wasn't working because I never specified a "switch" with
"Verbose". I could never have guessed one was needed, as I thought it was
to *restrict* the logging output and therefore I never bothered coding one.
Perhaps it's in the fine print, but I'm no lawyer! So that's the magic
trick that I must have consistently missed for years now. Much appreciated
Dude -- *Greg*
P.S. It turns out the shared listener isn't needed in my case, so this
reduced config section works:
<sources>
<source name="MockSource" switchName="sourceSwitch"
switchType="System.Diagnostics.SourceSwitch">
<listeners>
<add name="consListener"
type="System.Diagnostics.ConsoleTraceListener"/>
<add name="textfileListener"
type="System.Diagnostics.TextWriterTraceListener" initializeData="mock.log"
/>
</listeners>
</source>
</sources>
<switches>
<add name="sourceSwitch" value="Verbose"/>
</switches>
P.P.S. I also noticed you don't need the Flush before the Close.