LighthouseGames / KmLogging

Kotlin multiplatform logging. High performance, composable and simple to use.
Apache License 2.0
84 stars 13 forks source link

Add ability to remove logger from list #23

Closed mikolajefento closed 7 months ago

mikolajefento commented 7 months ago

Introduction:

This pull request addresses a specific use case where short-lived loggers are required. The current limitation of the library is that custom loggers once added cannot be removed, hindering scenarios where temporary logging is needed.

Problem Statement:

Currently library lacks the capability to remove custom loggers, making it challenging for users who require short-lived logging instances.

Proposed Solution:

I have enhanced the library to include the ability to remove custom loggers. This improvement provides users with the flexibility to manage loggers dynamically, especially in scenarios where logging is needed for a specific duration.

Use Case Example:

Consider an application facilitating money transfers. With the new feature, a custom logger can be created for a single transfer and removed once the transaction is completed. This ensures that logs are concise and relevant, aiding in troubleshooting and error analysis.

Benefits:

ellsworthrw commented 7 months ago

I'll put this in 1.4.1