mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
e3c600b0c8
By moving super-noisy debugging logging to new TRACE level we can make long-term logging at DEBUG possible w/o removing any logging. Addresses ([#7279]) Related Issues: https://github.com/ElementsProject/lightning/issues/6927 https://github.com/chrisguida/smaug/issues/34 https://github.com/ZmnSCPxj/clboss/issues/194
46 lines
1.1 KiB
C
46 lines
1.1 KiB
C
#ifndef LIGHTNING_COMMON_STATUS_LEVELS_H
|
|
#define LIGHTNING_COMMON_STATUS_LEVELS_H
|
|
#include "config.h"
|
|
#include <ccan/tal/tal.h>
|
|
|
|
enum log_level {
|
|
/* Logging all IO. */
|
|
LOG_IO_OUT,
|
|
LOG_IO_IN,
|
|
/* Extra-gory logging details for deep debugging */
|
|
LOG_TRACE,
|
|
/* Gory details which are mainly good for debugging. */
|
|
LOG_DBG,
|
|
/* Information about what's going in. */
|
|
LOG_INFORM,
|
|
/* That's strange... */
|
|
LOG_UNUSUAL,
|
|
/* That's really bad, we're broken. */
|
|
LOG_BROKEN
|
|
};
|
|
#define LOG_LEVEL_MAX LOG_BROKEN
|
|
|
|
const char *log_level_name(enum log_level level);
|
|
bool log_level_parse(const char *levelstr, size_t len,
|
|
enum log_level *level);
|
|
|
|
/*
|
|
* These errors shouldn't happen:
|
|
*/
|
|
enum status_failreason {
|
|
/* Master daemon sent unknown/malformed command, or fd failed */
|
|
STATUS_FAIL_MASTER_IO,
|
|
|
|
/* Hsmd sent unknown/malformed command, or fd failed */
|
|
STATUS_FAIL_HSM_IO,
|
|
|
|
/* Gossipd sent unknown/malformed command, or fd failed */
|
|
STATUS_FAIL_GOSSIP_IO,
|
|
|
|
/* Other internal error. */
|
|
STATUS_FAIL_INTERNAL_ERROR,
|
|
};
|
|
#define STATUS_FAIL_MAX STATUS_FAIL_INTERNAL_ERROR
|
|
|
|
#endif /* LIGHTNING_COMMON_STATUS_LEVELS_H */
|