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

improve naming of plugin loggers

This commit is contained in:
Steffen Vogel 2021-06-21 16:07:46 -04:00
parent 30ac7dc3ec
commit adf48508e1

View file

@ -131,6 +131,10 @@ public:
virtual std::string
getName() const = 0;
/// Get plugin type
virtual std::string
getType() const = 0;
// Get plugin description
virtual std::string
getDescription() const = 0;
@ -138,10 +142,12 @@ public:
protected:
std::string path;
virtual
Logger
getLogger()
{
return logging.get("plugin:" + getName());
auto name = fmt::format("{}:{}", getType(), getName());
return logging.get(name);
}
};