blob: bf4ebe524b88e172a759d9c5185d2fb7750c8eb5 [file] [log] [blame]
Harald Welte6a93cfb2021-12-09 12:56:27 +01001[[remsim_logging]]
2== osmo-remsim logging
3
4All programs within the osmo-remsim project use the logging sub-system of `libosmocore`.
5
6Contrary to the larger Osmocom projects with their own VTY + configuration file, the
7logging configuration for osmo-remsim programs must happen via command line arguments.
8
9Also, contrary to the larger Osmocom projects, only logging to `stderr` is supported;
10no direct logging to log files, syslog, systemd, etc. is supported at this point.
11
12=== `-d` command line argument
13
14Every osmo-remsim program like `osmo-remsim-bankd`, `osmo-remsim-server` or
15`osmo-remsim-client-st2` supports a `-d` command line argument. This argument
16takes one mandatory parameter configuring the log level for each log sub-system
17as follows:
18
19`-d SUBSYS,num_lvl[:SUBSYS,num_lvl[:...]]`
20
21So basically, a colon-separated list of tuples, where each tuple contains the
22sub-system name and the _numeric_ log level.
23
24Below is the list of sub-systems and a table of numerical levels:
25
26.libosmocore log levels and their numeric values
27[options="header",width="30%",cols="1,1"]
28|===
29|Level name|Numeric value
30|DEBUG|1
31|INFO|3
32|NOTICE|5
33|ERROR|7
34|FATAL|8
35|===
36
37.osmo-remsim log sub-system names and their description
38[options="header",width="50%",cols="1,2"]
39|===
40|Sub-System Name|Description
41|DMAIN|respective main program code
42|DST2|SIMtrace2 `cardem` firmware interaction via USB
43|DRSPRO|RSPRO protocol between bankd, server and client
44|DREST|REST interface of `osmo-remsim-server`
45|DSLOTMAP|slotmap code shared by `osmo-remsim-server` and `osmo-remsim-bankd`
46|DBANKDW|worker threads of `osmo-remsim-bankd`
47|===
48
49=== Example
50
51Putting the above in a concrete example:
52
53`-d DMAIN,5:DRSPRO,1`
54
55would perform the following configuration:
56
57* log only NOTICE (or higher) messages in the DMAIN subsystem (low verbosity)
58* log DEBUG (or higher) messages in the DRSPRO subsystem (very high verbosity)