Skip to content

TraceSwitch value is not read from config #7970

Open
@aliostad

Description

@aliostad

Description

Unlike what docs TraceSwitch value is not read from app.config.

I have created a repro here: https://github.com/aliostad/TraceSwitchDoesNotWork

Reproduction Steps

Add system.diagnostics switch to the config and then in the code create a TraceSwitch with that name. Value is not read.

As in the repro https://github.com/aliostad/TraceSwitchDoesNotWork

Expected behavior

Reading value Error (1)

Actual behavior

Reading value Off (0) - perhaps just the default

Regression?

I tried netcoreapp3.1 and it was the same

Known Workarounds

None

Configuration

.NET 6.0 on mac, x64

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions