You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make empty and '*' debugModules to result in all debug messages to be printed
Previously there was no way to enable debug messages for non-module
code. But we want to be able to issue debug messages e.g. from
Services or framework. In addition, the empty debugModules (that is
also the default value) leading to no debug messages being issued
seemed now a poor choice (given the amount of complaints in the past
on how difficult MessageLogger is to configure, especially for debug
messages).
The `MessageLogger` PSet knows that all _extra_ parameter labels must be of type `cms.untracked.PSet` so one can use a python `dict` set specific parameters for that PSet and allow all other parameters to use their default default values.
67
67
68
68
69
+
## Have all debug messages be shown
69
70
70
-
## Have debug message show for a given module
71
71
By default, all `LogDebug` code is actually removed at compilation time so any messages you want to see have to be recompiled after setting the `EDM_ML_DEBUG` compilation parameter
72
72
73
73
```bash
74
74
>export USER_CXXFLAGS="-DEDM_ML_DEBUG"
75
75
> scram b ...
76
76
```
77
77
78
-
Then in the `MessageLogger` configuration you need to lower the `threshold` to `"DEBUG"` and then say you want debug messages from the module. So if your module uses the label `myModule` in the configuration, you'd specify
78
+
Then in the `MessageLogger` configuration you need to lower the `threshold` to `"DEBUG"`
79
+
```python
80
+
process.MessageLogger.cerr.threshold ="DEBUG"
81
+
```
82
+
83
+
The default `MessageLogger` configuration leads to all debug messages to be printed (also outside modules).
79
84
85
+
86
+
## Have debug message show for a given module
87
+
88
+
It is possible to restrict the shown debug messages to specific module(s). For example, if your module uses the label `myModule` in the configuration, you'd specify
80
89
```python
81
90
process.MessageLogger.cerr.threshold ="DEBUG"
82
91
process.MessageLogger.debugModules = ["myModule"]
83
92
```
84
93
85
-
If you are not interested in a particular module but instead want to see all debug messages, you can instead set `debugModules` using `*`
86
-
94
+
For backwards compatibility, setting `debugModules` to `*` has the same effect as setting `debugModules` empty, i.e. showing all debug messages.
0 commit comments