From 8206f867a56a23fe3ed214d833826326175a29ec Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 31 Jan 2018 20:24:11 +0100 Subject: [PATCH] logging: use similar log style in all modules --- fpga/include/villas/plugin.hpp | 2 +- fpga/tests/graph.cpp | 15 ++++----------- fpga/tests/main.cpp | 2 -- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/fpga/include/villas/plugin.hpp b/fpga/include/villas/plugin.hpp index c07501e83..35a4912ba 100644 --- a/fpga/include/villas/plugin.hpp +++ b/fpga/include/villas/plugin.hpp @@ -81,7 +81,7 @@ public: protected: static SpdLogger getStaticLogger() - { return loggerGetOrCreate("Plugin"); } + { return loggerGetOrCreate("plugin"); } private: /* Just using a standard std::list<> to hold plugins is problematic, because diff --git a/fpga/tests/graph.cpp b/fpga/tests/graph.cpp index b49659e5c..2dd8e6c9b 100644 --- a/fpga/tests/graph.cpp +++ b/fpga/tests/graph.cpp @@ -4,23 +4,16 @@ #include #include -static void init_graph() -{ - spdlog::set_pattern("[%T] [%l] [%n] %v"); - spdlog::set_level(spdlog::level::debug); -} - TestSuite(graph, - .init = init_graph, .description = "Graph library" ); Test(graph, basic, .description = "DirectedGraph") { - auto logger = loggerGetOrCreate("unittest:basic"); + auto logger = loggerGetOrCreate("test:graph:basic"); logger->info("Testing basic graph construction and modification"); - villas::graph::DirectedGraph<> g("unittest:basic"); + villas::graph::DirectedGraph<> g("test:graph:basic"); std::shared_ptr v1(new villas::graph::Vertex); std::shared_ptr v2(new villas::graph::Vertex); @@ -48,11 +41,11 @@ Test(graph, basic, .description = "DirectedGraph") Test(graph, path, .description = "Find path") { - auto logger = loggerGetOrCreate("unittest:path"); + auto logger = loggerGetOrCreate("test:graph:path"); logger->info("Testing path finding algorithm"); using Graph = villas::graph::DirectedGraph<>; - Graph g("unittest:path"); + Graph g("test:graph:path"); std::shared_ptr v1(new villas::graph::Vertex); std::shared_ptr v2(new villas::graph::Vertex); diff --git a/fpga/tests/main.cpp b/fpga/tests/main.cpp index 844e3b64b..beb56f6b9 100644 --- a/fpga/tests/main.cpp +++ b/fpga/tests/main.cpp @@ -64,8 +64,6 @@ int main(int argc, char *argv[]) { int ret; - auto logger = loggerGetOrCreate("unittest"); - spdlog::set_pattern("[%T] [%l] [%n] %v"); spdlog::set_level(spdlog::level::debug); /* Run criterion tests */