Skip to content

.net8 preview4 AOT windows service process, log component always writes to ETW #87769

@xljiulang

Description

@xljiulang

Description

 var builder = WebApplication.CreateSlimBuilder(args);

 builder.Logging.ClearProviders();
 if (ServiceUtil.IsWindowsService() == false)
 {
     builder.Logging.AddConsole();
 }

If the above code is installed and run as a windows service after AOT, the log will always be written to ETW, but the JIT compilation behaves correctly.

Reproduction Steps

  1. clear all loger providers.
  2. build as AOT
  3. install and run as windows service

Expected behavior

Logs are not written to ETW

Actual behavior

Logs allway written to ETW

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions