diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-01-02 10:32:42 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-01-12 23:34:17 +0100 |
commit | 9a8bbec44769145bf6be2f541b5f61b713c49383 (patch) | |
tree | b6ab5c8ee63eb17c6d04b55e100fb3303cd9b483 /proto/wireguard/wireguard.h | |
parent | 7280c6f0469af86f3a587858d4126033347deb32 (diff) |
Wireguard: Replace log with WG_TRACE
Diffstat (limited to 'proto/wireguard/wireguard.h')
-rw-r--r-- | proto/wireguard/wireguard.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/proto/wireguard/wireguard.h b/proto/wireguard/wireguard.h index e1cce73f..30073869 100644 --- a/proto/wireguard/wireguard.h +++ b/proto/wireguard/wireguard.h @@ -4,6 +4,14 @@ #include "nest/protocol.h" #include "sysdep/linux/wireguard.h" +#ifdef LOCAL_DEBUG +#define WG_FORCE_DEBUG 1 +#else +#define WG_FORCE_DEBUG 0 +#endif +#define WG_TRACE(flags, msg, args...) do { if ((p->p.debug & flags) || WG_FORCE_DEBUG) \ + log(L_TRACE "%s: " msg, p->p.name , ## args ); } while(0) + struct peer_config { node n; const char *public_key; |