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
Add console_level (default WARNING) and file_level (default = level) to
LoggingConfig so INFO messages stay in the rule log file while the console
stays readable under parallel execution.
Copy file name to clipboardExpand all lines: config/schema.default.json
+64-2Lines changed: 64 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2848,7 +2848,7 @@
2848
2848
"properties": {
2849
2849
"level": {
2850
2850
"default": "INFO",
2851
-
"description": "Restrict console outputs to all infos, warning or errors only",
2851
+
"description": "Root log level. Messages below this level are discarded before reaching any handler.",
2852
2852
"enum": [
2853
2853
"DEBUG",
2854
2854
"INFO",
@@ -2858,6 +2858,37 @@
2858
2858
],
2859
2859
"type": "string"
2860
2860
},
2861
+
"console_level": {
2862
+
"default": "WARNING",
2863
+
"description": "Minimum level emitted to the console (stderr). Defaults to ``WARNING`` so parallel rule output stays readable; the full log is kept in the rule's log file.",
2864
+
"enum": [
2865
+
"DEBUG",
2866
+
"INFO",
2867
+
"WARNING",
2868
+
"ERROR",
2869
+
"CRITICAL"
2870
+
],
2871
+
"type": "string"
2872
+
},
2873
+
"file_level": {
2874
+
"anyOf": [
2875
+
{
2876
+
"enum": [
2877
+
"DEBUG",
2878
+
"INFO",
2879
+
"WARNING",
2880
+
"ERROR",
2881
+
"CRITICAL"
2882
+
],
2883
+
"type": "string"
2884
+
},
2885
+
{
2886
+
"type": "null"
2887
+
}
2888
+
],
2889
+
"default": null,
2890
+
"description": "Minimum level written to the rule log file. Defaults to ``level`` when unset."
2891
+
},
2861
2892
"format": {
2862
2893
"default": "%(levelname)s:%(name)s:%(message)s",
2863
2894
"description": "Custom format for log messages. See `LogRecord <https://docs.python.org/3/library/logging.html#logging.LogRecord>`_ attributes.",
@@ -8182,7 +8213,7 @@
8182
8213
"properties": {
8183
8214
"level": {
8184
8215
"default": "INFO",
8185
-
"description": "Restrict console outputs to all infos, warning or errors only",
8216
+
"description": "Root log level. Messages below this level are discarded before reaching any handler.",
8186
8217
"enum": [
8187
8218
"DEBUG",
8188
8219
"INFO",
@@ -8192,6 +8223,37 @@
8192
8223
],
8193
8224
"type": "string"
8194
8225
},
8226
+
"console_level": {
8227
+
"default": "WARNING",
8228
+
"description": "Minimum level emitted to the console (stderr). Defaults to ``WARNING`` so parallel rule output stays readable; the full log is kept in the rule's log file.",
8229
+
"enum": [
8230
+
"DEBUG",
8231
+
"INFO",
8232
+
"WARNING",
8233
+
"ERROR",
8234
+
"CRITICAL"
8235
+
],
8236
+
"type": "string"
8237
+
},
8238
+
"file_level": {
8239
+
"anyOf": [
8240
+
{
8241
+
"enum": [
8242
+
"DEBUG",
8243
+
"INFO",
8244
+
"WARNING",
8245
+
"ERROR",
8246
+
"CRITICAL"
8247
+
],
8248
+
"type": "string"
8249
+
},
8250
+
{
8251
+
"type": "null"
8252
+
}
8253
+
],
8254
+
"default": null,
8255
+
"description": "Minimum level written to the rule log file. Defaults to ``level`` when unset."
8256
+
},
8195
8257
"format": {
8196
8258
"default": "%(levelname)s:%(name)s:%(message)s",
8197
8259
"description": "Custom format for log messages. See `LogRecord <https://docs.python.org/3/library/logging.html#logging.LogRecord>`_ attributes.",
Copy file name to clipboardExpand all lines: doc/release_notes.rst
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,8 @@ Release Notes
20
20
21
21
* perf: Optimize dask settings for computing weather-dependent profiles (https://github.com/PyPSA/pypsa-eur/pull/2137).
22
22
23
+
* Split logging levels between console and log file: the console now defaults to ``WARNING`` while the rule log file still captures ``INFO``. Configure via ``logging.console_level`` and ``logging.file_level`` (https://github.com/PyPSA/pypsa-eur/pull/2144).
description="Minimum level emitted to the console (stderr). Defaults to ``WARNING`` so parallel rule output stays readable; the full log is kept in the rule's log file.",
0 commit comments