forked from lix-project/lix
Style fixes
This commit is contained in:
parent
801112de1a
commit
8bd892117a
|
@ -5,7 +5,7 @@ namespace nix {
|
||||||
|
|
||||||
LogFormat defaultLogFormat = LogFormat::raw;
|
LogFormat defaultLogFormat = LogFormat::raw;
|
||||||
|
|
||||||
LogFormat parseLogFormat(const string &logFormatStr) {
|
LogFormat parseLogFormat(const std::string & logFormatStr) {
|
||||||
if (logFormatStr == "raw")
|
if (logFormatStr == "raw")
|
||||||
return LogFormat::raw;
|
return LogFormat::raw;
|
||||||
else if (logFormatStr == "raw-with-logs")
|
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);
|
throw Error("option 'log-format' has an invalid value '%s'", logFormatStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger *makeDefaultLogger() {
|
Logger * makeDefaultLogger() {
|
||||||
switch (defaultLogFormat) {
|
switch (defaultLogFormat) {
|
||||||
case LogFormat::raw:
|
case LogFormat::raw:
|
||||||
return makeSimpleLogger(false);
|
return makeSimpleLogger(false);
|
||||||
|
@ -34,11 +34,11 @@ Logger *makeDefaultLogger() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void setLogFormat(const string &logFormatStr) {
|
void setLogFormat(const std::string & logFormatStr) {
|
||||||
setLogFormat(parseLogFormat(logFormatStr));
|
setLogFormat(parseLogFormat(logFormatStr));
|
||||||
}
|
}
|
||||||
|
|
||||||
void setLogFormat(const LogFormat &logFormat) {
|
void setLogFormat(const LogFormat & logFormat) {
|
||||||
defaultLogFormat = logFormat;
|
defaultLogFormat = logFormat;
|
||||||
createDefaultLogger();
|
createDefaultLogger();
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@ enum class LogFormat {
|
||||||
barWithLogs,
|
barWithLogs,
|
||||||
};
|
};
|
||||||
|
|
||||||
void setLogFormat(const string &logFormatStr);
|
void setLogFormat(const std::string & logFormatStr);
|
||||||
void setLogFormat(const LogFormat &logFormat);
|
void setLogFormat(const LogFormat & logFormat);
|
||||||
|
|
||||||
void createDefaultLogger();
|
void createDefaultLogger();
|
||||||
|
|
||||||
|
|
|
@ -461,7 +461,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Logger *makeProgressBar(bool printBuildLogs)
|
Logger * makeProgressBar(bool printBuildLogs)
|
||||||
{
|
{
|
||||||
return new ProgressBar(
|
return new ProgressBar(
|
||||||
printBuildLogs,
|
printBuildLogs,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
Logger* makeProgressBar(bool printBuildLogs = false);
|
Logger * makeProgressBar(bool printBuildLogs = false);
|
||||||
|
|
||||||
void startProgressBar(bool printBuildLogs = false);
|
void startProgressBar(bool printBuildLogs = false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue