NatLabRockies / NatLabRockies/Spawn
Setup a global default spdlog logger
@lefticus is already working on this.
Since Jun 5, 2023.
- Dominant language
- C++
- Stars
- 19
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
The default spdlog logger uses spdlog's built in registry to store the default logger. The registry's singleton implementation uses a local static variable that causes the default logger to be non unique. https://github.com/gabime/spdlog/blob/v1.x/include/spdlog/details/registry-inl.h#L287
This has negative impliations for Spawn which uses the default logger. We would like to be able to set the log level one time at the initialization of the spawn program such as here https://github.com/NREL/Spawn/blob/compiler/cli/main.cpp#L46.
The problem is that the different compiled units of Spawn have their on log registry, so the log settings established in main do not apply to other contexts. The result is we have to set log settins for each log instance such as here https://github.com/NREL/Spawn/blob/compiler/optimica/optimica.cpp#L20.
The purpose of this issue is to design some type of common log instance that applies across compiled units.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.