Skip to content

Optional logging #209

@nesrve

Description

@nesrve

Hey! I've been using swift-service-lifecycle for a few terminal based applications, mostly for my TUI libraries and apps on top of it, to cleanly handle shutdowns without having to manually deal with unix signals - been a life saver. However, in all of my applications, i've not wanted to use logging - or more like can't use logging due to the environment in which the application is rendered - the terminal. To construct a ServiceGroup you're currently forced to pass a logger as an argument, and that logger needs to be instantiated - potentially wasting up resources and adds boilerplate code - especially so when you set up a no-op. This brings me to ask, can we make logging optional - without an API breaking change? Or, even consider an API breaking change for the sake of more ergonomically usage outside of server based CLI apps - such as TUIs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions