1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 16:31:47 +02:00

* Debug levels. Use `--verbose / -v LEVEL' to display only messages

up to the given verbosity levels.  These currently are:

    lvlError = 0, 
    lvlNormal = 5,
    lvlDebug = 10,
    lvlDebugMore = 15

  although only lvlError and lvlDebug are actually used right now.
This commit is contained in:
Eelco Dolstra 2003-07-24 08:53:43 +00:00
parent b75719b984
commit 1a7468a57a
8 changed files with 68 additions and 25 deletions

View file

@ -72,17 +72,26 @@ void deletePath(string path);
/* Messages. */
typedef enum {
lvlError = 0,
lvlNormal = 5,
lvlDebug = 10,
lvlDebugMore = 15
} Verbosity;
extern Verbosity verbosity; /* supress msgs > this */
class Nest
{
private:
bool nest;
public:
Nest(bool nest);
Nest(Verbosity level, const format & f);
~Nest();
};
void msg(const format & f);
void debug(const format & f);
void msg(Verbosity level, const format & f);
void debug(const format & f); /* shorthand */
/* Wrappers arount read()/write() that read/write exactly the