-
Notifications
You must be signed in to change notification settings - Fork 2
/
DEBUG
28 lines (18 loc) · 1.01 KB
/
DEBUG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Debugging with FTNd.
From version 0.33.15 I changed the way debug logging goes. There are no more
#ifdef .. #endif directives in the code that change the loging behaviour.
Lines that could be logged in the code for debug are now written in two
possible ways:
Syslog('b', "This is always logged for debug");
Syslog('B', "This is logged if most_debug flag is true");
The difference is the uppercase or lowercase logclass. Uppercase is only logged
if the global flag most_debug is set to true. If you want to use it in one of
the sources declare that flag like this:
extern int most_debug;
Then, from the moment you need the extra debugging, insert
most_debug = TRUE;
in the code, and set it to FALSE when you are done.
I did this because the extra debug is good for developers but not for regualar
users that need some extra logging. The log output with the most_debug flag
set to TRUE can be huge and does affect system performance.
For those who are developing code for FTNd, use two kinds on debug logging.