1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

logging: use similar log style in all modules

This commit is contained in:
Steffen Vogel 2018-01-31 20:24:11 +01:00
parent 2336acaf98
commit 8206f867a5
3 changed files with 5 additions and 14 deletions

View file

@ -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

View file

@ -4,23 +4,16 @@
#include <villas/directed_graph.hpp>
#include <villas/log.hpp>
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<villas::graph::Vertex> v1(new villas::graph::Vertex);
std::shared_ptr<villas::graph::Vertex> 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<villas::graph::Vertex> v1(new villas::graph::Vertex);
std::shared_ptr<villas::graph::Vertex> v2(new villas::graph::Vertex);

View file

@ -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 */