Smooth-logger

Latest version: v1.0.1

Safety actively analyzes 623739 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.0.1

**Full Changelog**: https://github.com/MurdoMaclachlan/smooth_logger/compare/1.0.0...1.0.1

Bug Fixes
* Fix crash on creating new log entry (MurdoMaclachlan: https://github.com/MurdoMaclachlan/smooth_logger/pull/22)

1.0.0

**This release includes potentially breaking changes.**

**As of this release, `Categories.ENABLED` is deprecated and replaced with `Categories.PRINT`. It will continue to work for now but will be removed in a later release.**

**Full Changelog**: https://github.com/MurdoMaclachlan/smooth_logger/compare/0.3.0...1.0.0

New Features
* Added `Logger.is_scope()`, which can be used to check if a scope exists and optionally if it matches a given category. (MurdoMaclachlan: 8)
* `Logger.get()` can now be queried for a specific number of log entries. (MurdoMaclachlan: 18)
* Replaced `Categories.ENABLED` with `Categories.PRINT` and added `Categories.SAVE`, allowing greater control over printing and saving of log files. (MurdoMaclachlan: 18)

Changes
* Removed integration with `smooth_logger` library. (MurdoMaclachlan: 20)
* Replaced "NOSCOPE" system with None value. This is a potentially breaking change. (MurdoMaclachlan: 13)
* `_get_time()` now uses a more efficient boolean argument in place of a String method. (MurdoMaclachlan: 16)
* `_get_time()` is now protected rather than private. (MurdoMaclachlan: 6)
* Reduced privatisation of logger attributes: `is_empty` and `program_name` are now public, while `log`, `output_path` and `scopes` are protected. (MurdoMaclachlan: 6)
* Moved `__create_log_folder()` to protected `_create_folder()` to improve extendability. (MurdoMaclachlan: 7)
* Replaced fatal error log in `__define_output_path()` with `OSError`, allowing it to be cleanly caught by end-user programs. (MurdoMaclachlan: 14)

0.3.0

**This release includes breaking changes. Please see the README for new information on scope categories.**

**Full Changelog**: https://github.com/MurdoMaclachlan/smooth_logger/compare/0.2.2...3.0.0

New

- Added `Logger.remove_scope()`, enabling scopes to be removed at run-time. Care should be taken with this method.

Changes

- Scope categories now use an enumeration instead of plain integers, allowing new categories to be added without breaking the API. This initial change is breaking, however, as plain integers are no longer accepted.
- The logger now only accepts categories defined in the enumeration. Any other values passed will produce warnings or errors.
- README restructured to include complete and up-to-date usage information.

Bug Fixes

- Fixed `Logger.get()` returning `None` if mode `recent` was used.

0.2.2

Bug Fixes

- Fixed incorrect argument order to `Logger.__display_log_entry()` call in `Logger.new()`

0.2.1

Bug Fixes

- Fix incorrect default value for `print_to_console` in `Logger.new()`

0.2.0

What's Changed
- Added `Logger.add_scope()`, allowing addition of custom logging scopes. A new scope must be provided with a name and a value.
- Added `Logger.edit_scope()`, allowing existing logging scopes to have their value changed during run-time.
- Added support for passing a user defined config path in case of operating systems where automatic determination is not supported.
- Added an optional argument, `notify: bool`, to `Logger.new()`, allowing a log message to be created and sent as a desktop notification in one function call.
- Fixed `Logger.get()` not returning any entries if no specific scope is requested.
- Moved `LogEntry` class to its own file.
- `Logger.define_output_path()` is now private.
- `Logger.__get_time()` now uses `Logger.new()` to log error messages.
- Improvements in commenting, variable names, code structure, formatting and type hinting.

**Full Changelog**: https://github.com/MurdoMaclachlan/smooth_logger/compare/c19516df72fa650b14621aa1d6d2905253bf3e64...fe8ca24e81e19e54b134ed4702e10e772bb41a34

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.