IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 7dc4addd authored by Ralf Ulrich's avatar Ralf Ulrich
Browse files

Merge branch 'fix_logging' into 'master'

make functions inline, otherwise the linker complains

See merge request !262
parents e19bc849 117132d2
No related branches found
No related tags found
No related merge requests found
Subproject commit 47e6e5abb78b8151c9748af44e09efcbee810fac Subproject commit 968325e6a734e3967c1aff15138f72b6b13edf0b
...@@ -68,7 +68,7 @@ namespace corsika::logging { ...@@ -68,7 +68,7 @@ namespace corsika::logging {
* @param defaultlog If True, set this as the default logger. * @param defaultlog If True, set this as the default logger.
* @returns The constructed and formatted logger. * @returns The constructed and formatted logger.
*/ */
auto CreateLogger(std::string const& name, bool const defaultlog = false) { inline auto CreateLogger(std::string const& name, bool const defaultlog = false) {
// create the logger // create the logger
// this is currently a colorized multi-threading safe logger // this is currently a colorized multi-threading safe logger
...@@ -97,7 +97,7 @@ namespace corsika::logging { ...@@ -97,7 +97,7 @@ namespace corsika::logging {
* @param defaultlog If True, make this the default logger. * @param defaultlog If True, make this the default logger.
* @returns The constructed and formatted logger. * @returns The constructed and formatted logger.
*/ */
auto GetLogger(std::string const& name, bool const defaultlog = false) { inline auto GetLogger(std::string const& name, bool const defaultlog = false) {
// attempt to get the logger from the registry // attempt to get the logger from the registry
auto logger = spdlog::get(name); auto logger = spdlog::get(name);
...@@ -121,7 +121,7 @@ namespace corsika::logging { ...@@ -121,7 +121,7 @@ namespace corsika::logging {
* @param name The minimum log level required to print. * @param name The minimum log level required to print.
* *
*/ */
auto SetDefaultLevel(level::level_enum const minlevel) -> void { inline auto SetDefaultLevel(level::level_enum const minlevel) -> void {
spdlog::set_level(minlevel); spdlog::set_level(minlevel);
} }
...@@ -131,7 +131,7 @@ namespace corsika::logging { ...@@ -131,7 +131,7 @@ namespace corsika::logging {
* @param name The minimum log level required to print. * @param name The minimum log level required to print.
* *
*/ */
auto SetLevel(level::level_enum const minlevel) -> void { inline auto SetLevel(level::level_enum const minlevel) -> void {
corsika->set_level(minlevel); corsika->set_level(minlevel);
} }
...@@ -143,7 +143,7 @@ namespace corsika::logging { ...@@ -143,7 +143,7 @@ namespace corsika::logging {
* *
*/ */
template <typename TLogger> template <typename TLogger>
auto SetLevel(TLogger& logger, level::level_enum const minlevel) -> void { inline auto SetLevel(TLogger& logger, level::level_enum const minlevel) -> void {
logger->set_level(minlevel); logger->set_level(minlevel);
} }
...@@ -154,7 +154,7 @@ namespace corsika::logging { ...@@ -154,7 +154,7 @@ namespace corsika::logging {
* *
*/ */
template <typename TLogger> template <typename TLogger>
auto AddSourceInfo(TLogger& logger) -> void { inline auto AddSourceInfo(TLogger& logger) -> void {
logger->set_pattern("[%n:%^%-8l%$(%s:%!:%#)] %v"); logger->set_pattern("[%n:%^%-8l%$(%s:%!:%#)] %v");
} }
...@@ -165,7 +165,7 @@ namespace corsika::logging { ...@@ -165,7 +165,7 @@ namespace corsika::logging {
* *
*/ */
template <typename TLogger> template <typename TLogger>
auto ResetPattern(TLogger& logger) -> void { inline auto ResetPattern(TLogger& logger) -> void {
logger->set_pattern(default_pattern); logger->set_pattern(default_pattern);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment