1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

* Nix now has three different formats for the log information it

writes to stderr:
  
  - `pretty': the old nested style (default)
  - `escapes': uses escape codes to indicate nesting and message
    level; can be processed using `log2xml'
  - `flat': just plain text, no nesting

  These can be set using `--log-type TYPE' or the NIX_LOG_TYPE
  environment variable.
This commit is contained in:
Eelco Dolstra 2004-03-22 20:53:49 +00:00
parent 79bb0008ec
commit 777e13b94b
3 changed files with 52 additions and 7 deletions

View file

@ -100,6 +100,13 @@ void writeStringToFile(const Path & path, const string & s);
/* Messages. */
typedef enum {
ltPretty, /* nice, nested output */
ltEscapes, /* nesting indicated using escape codes (for log2xml) */
ltFlat /* no nesting */
} LogType;
typedef enum {
lvlError,
lvlInfo,
@ -109,7 +116,8 @@ typedef enum {
lvlVomit
} Verbosity;
extern Verbosity verbosity; /* supress msgs > this */
extern LogType logType;
extern Verbosity verbosity; /* suppress msgs > this */
class Nest
{