Commit a8a587d
fix: respect PLUGINS_LOG_LEVEL environment variable in all runtime.py files (#48)
* fix: respect PLUGINS_LOG_LEVEL environment variable in all runtime.py files
- Updated grpc/server/runtime.py to check PLUGINS_LOG_LEVEL env var before command-line arg
- Updated mcp/server/runtime.py to add logging configuration with PLUGINS_LOG_LEVEL support
- Updated unix/server/runtime.py to respect PLUGINS_LOG_LEVEL instead of hardcoded INFO level
- All implementations now log to stderr and follow consistent pattern
* refactor: use get_settings().log_level instead of hardcoded env var
Address PR review feedback to use the settings infrastructure instead of
directly accessing environment variables. This approach:
- Keeps the env var name defined in one place (PluginsSettings model)
- Gets .env file support for free
- Stays consistent with how other settings are read in the codebase
Changes:
- grpc/server/runtime.py: Use get_settings().log_level with fallback to args
- mcp/server/runtime.py: Use get_settings().log_level
- unix/server/runtime.py: Use get_settings().log_level
---------
Co-authored-by: Bogdan-Marius-Catanus <bogdan-marius.catanus@ibm.com>1 parent 380abad commit a8a587d
3 files changed
Lines changed: 23 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
293 | 296 | | |
294 | | - | |
| 297 | + | |
295 | 298 | | |
| 299 | + | |
296 | 300 | | |
297 | 301 | | |
298 | 302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
83 | 94 | | |
84 | 95 | | |
85 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | | - | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
0 commit comments