c3sr / pangolin

6 stars 0 forks source link

pangolin::logger::console is multiply-defined if pangolin is included in multiple source files #24

Closed cwpearson closed 5 years ago

cwpearson commented 5 years ago

https://github.com/c3sr/pangolin/blob/5f3c4cda420a0e2b89d14dc4269674149c49773d/include/pangolin/logger.hpp#L10

SPDLOG may provide a global logger registry that should be used instead.

We should also build a test to check for this case.

cwpearson commented 5 years ago

Fixed in fc13361cec5a9280e5986a0cc750d06ed9fd8de6

Basically, the logger is now static, and hidden behind a console() function. A call to pangolin::init() is required in order to initialize the logger.