mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
Add "warning" verbosity level
This ensures that "nix" shows warnings. Previously these were hidden
because they were at "info" level.
(cherry picked from commit 615a9d031d
)
This commit is contained in:
parent
64ec087f58
commit
5600b070a7
3 changed files with 4 additions and 2 deletions
|
@ -21,7 +21,7 @@ Logger * logger = makeDefaultLogger();
|
||||||
|
|
||||||
void Logger::warn(const std::string & msg)
|
void Logger::warn(const std::string & msg)
|
||||||
{
|
{
|
||||||
log(lvlInfo, ANSI_RED "warning:" ANSI_NORMAL " " + msg);
|
log(lvlWarn, ANSI_RED "warning:" ANSI_NORMAL " " + msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
class SimpleLogger : public Logger
|
class SimpleLogger : public Logger
|
||||||
|
@ -46,6 +46,7 @@ public:
|
||||||
char c;
|
char c;
|
||||||
switch (lvl) {
|
switch (lvl) {
|
||||||
case lvlError: c = '3'; break;
|
case lvlError: c = '3'; break;
|
||||||
|
case lvlWarn: c = '4'; break;
|
||||||
case lvlInfo: c = '5'; break;
|
case lvlInfo: c = '5'; break;
|
||||||
case lvlTalkative: case lvlChatty: c = '6'; break;
|
case lvlTalkative: case lvlChatty: c = '6'; break;
|
||||||
default: c = '7';
|
default: c = '7';
|
||||||
|
|
|
@ -6,6 +6,7 @@ namespace nix {
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
lvlError = 0,
|
lvlError = 0,
|
||||||
|
lvlWarn,
|
||||||
lvlInfo,
|
lvlInfo,
|
||||||
lvlTalkative,
|
lvlTalkative,
|
||||||
lvlChatty,
|
lvlChatty,
|
||||||
|
|
|
@ -93,7 +93,7 @@ void mainWrapped(int argc, char * * argv)
|
||||||
if (legacy) return legacy(argc, argv);
|
if (legacy) return legacy(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
verbosity = lvlError;
|
verbosity = lvlWarn;
|
||||||
settings.verboseBuild = false;
|
settings.verboseBuild = false;
|
||||||
|
|
||||||
NixArgs args;
|
NixArgs args;
|
||||||
|
|
Loading…
Reference in a new issue