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
Feature/v3/feature/386 use better default logging colors and dont log to file by default (#394)
* Fix `charge_state` Constraint in `Storage` leading to incorrect losses in discharge and therefore incorrect charge states and discharge values (#347)
* Fix equation in Storage
* Fix test for equation in Storage
* Update CHANGELOG.md
* Improve Changelog Message
* Fix CHANGELOG.md
* Simplify changes from next release
* Update CHANGELOG.md
* Fix CHANGELOG.md
* chore(deps): update dependency mkdocs-material to v9.6.20 (#369)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Improve renovate.json to automerge ruff despite 0.x version
* chore(deps): update dependency tsam to v2.3.9 (#379)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update dependency ruff to v0.13.2 (#378)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Feature/Improve Configuration options and handling (#385)
* Refactor configuration management: remove dataclass-based schema and simplify CONFIG structure.
* Refactor configuration loading: switch from `os` to `pathlib`, streamline YAML loading logic.
* Refactor logging setup: split handler creation into dedicated functions, simplify configuration logic.
* Improve logging configurability and safety
- Add support for `RotatingFileHandler` to prevent large log files.
- Introduce `console` flag for optional console logging.
- Default to `NullHandler` when no handlers are configured for better library behavior.
* Temp
* Temp
* Temp
* Temp
* Temp
* Temp
* Refactor configuration and logging: remove unused `merge_configs` function, streamline logging setup, and encapsulate `_setup_logging` as an internal function.
* Remove unused `change_logging_level` import and export.
* Add tests for config.py
* Expand `config.py` test coverage: add tests for custom config loading, logging setup, dict roundtrip, and attribute modification.
* Expand `test_config.py` coverage: add modeling config persistence test, refine logging reset, and improve partial config load assertions.
* Expand `test_config.py` coverage: add teardown for state cleanup and reset modeling config in setup.
* Add `CONFIG.reset()` method and expand test coverage to verify default restoration
* Refactor `CONFIG` to centralize defaults in `_DEFAULTS` and ensure `reset()` aligns with them; add test to verify consistency.
* Refactor `_DEFAULTS` to use `MappingProxyType` for immutability, restructure config hierarchy, and simplify `reset()` implementation for maintainability; update tests accordingly.
* Mark `TestConfigModule` tests to run in a single worker with `@pytest.mark.xdist_group` to prevent global config interference.
* Add default log file
* Update CHANGELOG.md
* Readd change_logging_level() for backwards compatability
* Add more options to config.py
* Add a docstring to config.y
* Add a docstring to config.y
* rename parameter message_format
* Improve color config
* Improve color config
* Update CHANGELOG.md
* Improve color handling
* Improve color handling
* Remove console Logging explicityl from examples
* Make log to console the default
* Make log to console the default
* Add individual level parameters for console and file
* Add extra Handler section
* Use dedicated levels for both handlers
* Switch back to not use Handlers
* Revert "Switch back to not use Handlers"
This reverts commit 05bbccb.
* Revert "Use dedicated levels for both handlers"
This reverts commit ed0542b.
* Revert "Add extra Handler section"
This reverts commit a133cc8.
* Revert "Add individual level parameters for console and file"
This reverts commit 19f81c9.
* Fix CHANGELOG.md
* Update CHANGELOG.md
* Fix CHANGELOG.md
* Allow blank issues
* Change default logging behaviour to other colors and no file logging
* Use white for INFO
* Use terminal default for INFO
* Explicitly use stdout for StreamHandler
* Use terminal default for Logging color
* Add option for loggger name
* Update CHANGELOG.md
* Ensure custom formats are being applied
* Catch empty config files
* Update test to match new defaults
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,9 +181,14 @@ Until here -->
181
181
- Added configurable log format settings: `CONFIG.Logging.date_format` and `CONFIG.Logging.format`
182
182
- Added configurable console settings: `CONFIG.Logging.console_width` and `CONFIG.Logging.show_path`
183
183
- Added `CONFIG.Logging.Colors` nested class for customizable log level colors using ANSI escape codes (works with both standard and Rich handlers)
184
+
- All examples now enable console logging to demonstrate proper logging usage
185
+
- Console logging now outputs to `sys.stdout` instead of `sys.stderr` for better compatibility with output redirection
184
186
185
187
### ♻️ Changed
186
188
- Logging and Configuration management changed
189
+
-**Breaking**: Console logging is now disabled by default (`CONFIG.Logging.console = False`). Enable it explicitly in your scripts with `CONFIG.Logging.console = True` and `CONFIG.apply()`
190
+
-**Breaking**: File logging is now disabled by default (`CONFIG.Logging.file = None`). Set a file path to enable file logging
191
+
- Improved default logging colors: DEBUG is now gray (`\033[90m`) for de-emphasized messages, INFO uses terminal default color (`\033[0m`) for clean output
187
192
188
193
### 🗑️ Deprecated
189
194
-`change_logging_level()` function is now deprecated in favor of `CONFIG.Logging.level` and `CONFIG.apply()`. Will be removed in version 3.0.0.
0 commit comments