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:
parent
2336acaf98
commit
8206f867a5
3 changed files with 5 additions and 14 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue