Bug 12961 - System.Diagnostics.SourceSwitch does not filter correctly
Summary: System.Diagnostics.SourceSwitch does not filter correctly
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: master
Hardware: PC All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-06-29 16:21 UTC by Jack Murray
Modified: 2013-06-29 16:21 UTC (History)
1 user (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Jack Murray 2013-06-29 16:21:09 UTC
Repro Code:

static void Main(string[] args)
        {
            TraceSource s = new TraceSource("MySource", SourceLevels.Information);
            s.Listeners.Clear();
            s.Listeners.Add(new ConsoleTraceListener());

            s.TraceEvent(TraceEventType.Critical, 0, "Should be traced.");
            s.TraceEvent(TraceEventType.Verbose, 1, "Should not be traced.");
        }

Output on Windows:

MySource Critical: 0 : Should be traced.

Output on Linux (mono 3.0.12 (master/7a2bc28) running on a Raspberry Pi:

MySource Critical: 0 : Should be traced.
MySource Verbose: 1 : Should not be traced.

See this bug on the Novell bugzilla for more details: https://bugzilla.novell.com/show_bug.cgi?id=682537

Note You need to log in before you can comment on or make changes to this bug.