Skip to content

UseSystemd seems to interfere with UseConsoleLifetime #3163

@webczat

Description

@webczat

Currently using dotnetcore sdk 3.1.200 and having some very hacky test aspnetcore app.
My goal is generally testing how things work, so I created a host that can be used as a standalone app, as systemd service, and as windows service.
I ran UseSystemd(), UseWindowsService() and UseConsoleLifetime() in this order. But it seems that even though my app runs as a normal console app, it nevertheless changes the console logging format.
Additionally if UseConsoleLifetime is first, then UseSystemd seems to override it because pressing ctrl+c does not do an orderly shutdown, I do not see log messages about host stopping. Does the systemd detection logic in UseSystemd malfunction?

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