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:
parent
b75719b984
commit
1a7468a57a
8 changed files with 68 additions and 25 deletions
15
src/util.hh
15
src/util.hh
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue