Team2122/Kartoshka

Command loggers use the base name and not the full name

Closed this issue · 7 comments

@PlasmaPower @Beta-Ultra

No?

CommandBase::CommandBase(const std::string& name) :
Command(name.c_str()), log(name.c_str()) {
DriveContinuous(YAML::Node config) : CommandBase(GetBaseName()) {
}

Hmm, should Commands be passed their name? That would be the only way to do this.

They are, you could do

GetBaseName() + config["name"].as<std::string>()

but that is gross

@amikhalev You would have to have a shorthand if to account for commands which only have one instance. We aren't doing that.

You could just have a method on CommandBase and Logger to set the logger name. That would be a Nick thing though

@PlasmaPower @Beta-Ultra Bump