diff options
Diffstat (limited to 'docs/logging.md')
-rw-r--r-- | docs/logging.md | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/docs/logging.md b/docs/logging.md index a495a7a..3d5ea61 100644 --- a/docs/logging.md +++ b/docs/logging.md | |||
@@ -10,13 +10,34 @@ For debugging purposes a logging framework is required. Simple qDebugs() proved | |||
10 | * logfiles | 10 | * logfiles |
11 | * a commandline monitor tool | 11 | * a commandline monitor tool |
12 | * some other developer tool | 12 | * some other developer tool |
13 | This way we get complete logs also if some resource was not started from the console (i.e. because it was already running). | ||
13 | 14 | ||
14 | ## Debug levels | 15 | ## Debug levels |
15 | * trace: trace individual codepaths. Likely outputs way to much information for all normal cases and likely is only ever temporarily enabled. Trace points are likely only inserted into code fragments that are known to be problematic. | 16 | * trace: trace individual codepaths. Likely outputs way to much information for all normal cases and likely is only ever temporarily enabled for certain areas. |
16 | * log: Comprehensive debug output. Enabled on demand | 17 | * log: Comprehensive debug output. Enabled on demand |
17 | * warning: Only warnings, should always be logged. | 18 | * warning: Only warnings, should always be logged. |
18 | * error: Critical messages that should never appear. Should always be logged. | 19 | * error: Critical messages that should never appear. Should always be logged. |
19 | 20 | ||
21 | ## Debug areas | ||
22 | Debug areas split the code into sections that can be enabled/disabled as one. | ||
23 | This is supposed to give finer grained control over what is logged or displayed. | ||
24 | |||
25 | Debug areas may align with classes, but don't have to, the should be made so that they are useful. | ||
26 | |||
27 | Areas could be: | ||
28 | |||
29 | * resource.sync.performance | ||
30 | * resource.sync | ||
31 | * resource.listener | ||
32 | * resource.pipeline | ||
33 | * resource.store | ||
34 | * resource.communication | ||
35 | * client.communication | ||
36 | * client.communication.org.sink.resource.maildir.identifier1 | ||
37 | * client.queryrunner | ||
38 | * client.queryrunner.performance | ||
39 | * common.typeindex | ||
40 | |||
20 | ## Collected information | 41 | ## Collected information |
21 | Additionally to the regular message we want: | 42 | Additionally to the regular message we want: |
22 | 43 | ||
@@ -24,5 +45,5 @@ Additionally to the regular message we want: | |||
24 | * threadid? | 45 | * threadid? |
25 | * timestamp | 46 | * timestamp |
26 | * sourcefile + position + function name | 47 | * sourcefile + position + function name |
27 | * application name / resource identfier | 48 | * application name / resource identifier |
28 | * component identifier (i.e. resource access) | 49 | * area (i.e. resource access) |