[Bug/Feature] N/A
[Cause] To keep things clean and consistent
[Solution] N/A
[Verification] Build, run the junk tester
Change-Id: I75e55448a5f7c559882c6433dc82fae60ab2083b
mChannel.setCloseOnExec(true);
config::loadFromFD(mChannel.getFD(), mConfig);
- logger::setupLogger(mConfig.mLogger.getType(),
- mConfig.mLogger.getLevel(),
- mConfig.mLogger.getArg());
+ logger::setupLogger(mConfig.mLogger.mType,
+ mConfig.mLogger.mLevel,
+ mConfig.mLogger.mArg);
LOGD("Config & logging restored");
}
}
- mType = static_cast<int>(type);
- mLevel = static_cast<int>(level);
+ mType = type;
+ mLevel = level;
mArg = arg;
}
/**
* Logger configuration
*/
-struct LoggerConfig {
-private:
- int mType;
- int mLevel;
+struct LoggerConfig
+{
+ logger::LogType mType;
+ logger::LogLevel mLevel;
std::string mArg;
-public:
void set(const logger::LogType type,
const logger::LogLevel level,
const std::string &arg = "");
- logger::LogType getType() const {return static_cast<logger::LogType>(mType);}
- logger::LogLevel getLevel() const {return static_cast<logger::LogLevel>(mLevel);}
- std::string getArg() const {return mArg;}
-
CONFIG_REGISTER
(
mType,