emilk / loguru

A lightweight C++ logging library
The Unlicense
1.77k stars 256 forks source link

Request: way to call only the non-state parts of loguru::init() #163

Open cxw42 opened 3 years ago

cxw42 commented 3 years ago

Thank you for this library, which looks very useful! I am using it in a shared library that will be loaded by other people's code. I would like to use loguru::init(), but (1) I don't want to break any atexit() the calling code may be using, and (2) I don't have argc/argv.

Would you be willing to pull the parts of init() that don't touch application state into a separate function that I could call (and that init() would continue to call)? E.g., I'd like to be able to use the getcwd and preamble parts of init(), but not the rest.

Thank you for considering this request!