Skip to main content

A logging package for Python applications

Project description

My Logging Package

A simple logging package for Python applications.

Installation

You can install the package using pip:

pip install git+https://github.com/yourusername/my_logging_package.git


# Changelog

## [0.4] - 2024-08-07
### Added
- Configuration for Black code formatter to align with Flake8 linting styles.
- Black's `pyproject.toml` configuration file with a line length of 79 characters to match Flake8.
- Flake8's `.flake8` configuration file updated to ignore `E203` and `W503` for compatibility with Black.
- Option to enable console logging in addition to file logging in the `setup_logger` function.
- Error handling to ensure at least one logging option (file or console) is enabled.
- Sad path tests to handle invalid log levels, invalid log file paths, and missing parameters.

### Changed
- Default line length changed from 88 to 79 characters to maintain consistency with Flake8.
- `setup_logger` function updated to raise an error if both `log_file` and `console` are not provided.
- Updated test cases to include validations for new error handling.

### Fixed
- Handled `None` values in `set_logging_level` function to avoid `AttributeError`.
- Corrected the expected exception in the `test_invalid_log_file_permission` test case from `PermissionError` to `FileNotFoundError`.

## [0.3] - 2024-08-07
### Added
- `set_logging_level` function to map string level names to logging constants.
- Ability to set logging levels dynamically based on string input (e.g., "DEBUG", "INFO").
- Parametrized tests to verify logging levels and ensure correct behavior for different levels.

### Changed
- Updated `setup_logger` function to accept logging level as a parameter.

## [0.2] - 2024-08-07
### Added
- Initial setup of the logging package with `setup_logger` function.
- Basic logging configuration with file handler and formatter.
- Unit tests to verify basic logging functionality.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kom_python_logging-0.4.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

kom_python_logging-0.4-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file kom_python_logging-0.4.tar.gz.

File metadata

  • Download URL: kom_python_logging-0.4.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for kom_python_logging-0.4.tar.gz
Algorithm Hash digest
SHA256 4ab8dfb633a1f1f8789057b2899e9e72cb2a15c13dfdfeb07bf3ae195114cbcf
MD5 9341444de74b46ecdd92325e4365c383
BLAKE2b-256 b3e95fc4b92198312bba5f44d0c78b6392af2ac2824b843df4eddcc27c08061a

See more details on using hashes here.

File details

Details for the file kom_python_logging-0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for kom_python_logging-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ad2b800dcb33966d36f31695958ce7420f490212dedb4b85e69f6022487deeb9
MD5 b072e138c446b02a995ed5bd0584ddc8
BLAKE2b-256 294163b1a3b90ac897e379f8df0ce91f63d009d6784e1be278e1a100d7aa3ad2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page