summary refs log tree commit diff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-03-22 20:53:49 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-03-22 20:53:49 +0000
commit777e13b94b2da466c16a5836b52413aa9d246cd5 (patch)
tree2d00fc590710fa8ecddaeda01f29db922266bb56 /src/libutil/util.hh
parent79bb0008ec9afa8d8cee9e6b807a579bcb1c92ab (diff)
downloadguix-777e13b94b2da466c16a5836b52413aa9d246cd5.tar.gz
* 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.  

Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r--src/libutil/util.hh10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 34fff003b8..ac96d7fc1a 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -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
 {