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:
parent
30ac7dc3ec
commit
adf48508e1
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue