mirror of
https://github.com/NixOS/nix
synced 2025-07-03 06:11:46 +02:00
Style fixes
This commit is contained in:
parent
801112de1a
commit
8bd892117a
4 changed files with 8 additions and 8 deletions
|
@ -5,7 +5,7 @@ namespace nix {
|
|||
|
||||
LogFormat defaultLogFormat = LogFormat::raw;
|
||||
|
||||
LogFormat parseLogFormat(const string &logFormatStr) {
|
||||
LogFormat parseLogFormat(const std::string & logFormatStr) {
|
||||
if (logFormatStr == "raw")
|
||||
return LogFormat::raw;
|
||||
else if (logFormatStr == "raw-with-logs")
|
||||
|
@ -19,7 +19,7 @@ LogFormat parseLogFormat(const string &logFormatStr) {
|
|||
throw Error("option 'log-format' has an invalid value '%s'", logFormatStr);
|
||||
}
|
||||
|
||||
Logger *makeDefaultLogger() {
|
||||
Logger * makeDefaultLogger() {
|
||||
switch (defaultLogFormat) {
|
||||
case LogFormat::raw:
|
||||
return makeSimpleLogger(false);
|
||||
|
@ -34,11 +34,11 @@ Logger *makeDefaultLogger() {
|
|||
}
|
||||
}
|
||||
|
||||
void setLogFormat(const string &logFormatStr) {
|
||||
void setLogFormat(const std::string & logFormatStr) {
|
||||
setLogFormat(parseLogFormat(logFormatStr));
|
||||
}
|
||||
|
||||
void setLogFormat(const LogFormat &logFormat) {
|
||||
void setLogFormat(const LogFormat & logFormat) {
|
||||
defaultLogFormat = logFormat;
|
||||
createDefaultLogger();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue