Skip to main content

log21

version pipeline status

A simple logging package that helps you log colorized messages in Windows console and other operating systems.

Features

  • Colors : The main reason for this package was to log text in the Windows console with the support of ANSI colors.
  • Argument parsing : log21's argument parser can be used like python's argparse, but it also colorizes the output.
  • Logging : A similar logger to logging. Logger but with colorized output and other options such as levelname modifications. It can also decolorize the output if you want to log into a file.
  • Pretty printing : Have you ever wanted to colorize the output of the pprint module? log21's pretty printer can do that.
  • Tree printing : You can pass a dict or list to log21.tree_print function, and it will print it in a tree-like structure. It's also colorized XD.
  • ProgressBar : log21's progress bar can be used to show progress of a process in a beautiful way.
  • LoggingWindow : Helps you to log messages and debug your code in a window other than the console.
  • CrashReporter : log21's crash reporter can be used to report crashes in different ways. You can use it to log crashes to console or files or use it to receive crash reports of your program through email. And you can also define your own crash reporter functions and use them instead!
  • Argumentify : You can use the argumentify feature to decrease the number of lines you need to write to parse command-line arguments. It's colored by the way!
  • Any idea? Feel free to open an issue or submit a merge request.

Issues contributors

Installation

Well, this is a python package so the first thing you need is python.

If you don't have python installed, please visit Python.org and install the latest version of python.

Then you can install log21 using pip module:

python -m pip install log21 -U

Or you can clone the repository and run:

pip install .

Or let the pip get it using git:

pip install git+https://gitlab.com/CodeWriter21/log21.git

Changelog

v3.12.0

Nested command groups can now carry a description via the reserved _help key: it shows both in the parent --help listing and as the group parser's own description, at any nesting depth. Non-string, top-level, and help-only-group uses fail fast with clear errors.

Full CHANGELOG

Usage Examples

See EXAMPLES.md

About

Author: CodeWriter21 (Mehrad Pooryoussof)

GitLab: CodeWriter21

Telegram Channel: @CodeWriter21

License

License

apache-2.0

Donate

In order to support this project you can donate some crypto of your choice 8D

Donate Addresses

Or if you can't, give this project a star on GitLab :)

References

Release files for log21 3.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for log21 3.12.0
File Size Uploaded
log21-3.12.0.tar.gz 95.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for log21 3.12.0
File Interpreter ABI Platform
log21-3.12.0-py3-none-any.whl Python 3 none any Details

Total release size: 199.5 kB

Release files / log21-3.12.0.tar.gz

Download URL log21-3.12.0.tar.gz
Size 95.7 kB
Tags Source
SHA-256 checksum
How to use checksums
002e643dc14caa3688c5d0d37c941b2a4ea608f9935711f12a6ace6874f6bc0a
BLAKE2b-256 checksum
How to use checksums
3cd8515d21b042ff1ba63465d37a1e15e693c49ad76d9ee6b5a8ad94d0d9e84a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / log21-3.12.0-py3-none-any.whl

Download URL log21-3.12.0-py3-none-any.whl
Size 103.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56f62a034c1fd95b0ff62c83ed166fd826473f5eee95f2ffd917b3e818d03ad3
BLAKE2b-256 checksum
How to use checksums
3a4fffcb1041258ab390324a78d6161d7e788d2944ba506327053276876c8b00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

3.12.2

2 release files

3.12.1

2 release files

This release

3.12.0 This release

2 release files

3.11.0

2 release files

3.10.3

2 release files

3.10.2

2 release files

3.9.0

2 release files

3.8.0

2 release files

3.7.1

2 release files

3.7.0

2 release files

3.6.0

2 release files

3.5.0

2 release files

3.4.0

2 release files

3.3.3

2 release files

3.3.2

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.10.0

2 release files

2.9.2

2 release files

2.9.1

2 release files

2.9.0

2 release files

2.8.1

2 release files

2.8.0

2 release files

2.7.1

2 release files

2.7.0

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.4

2 release files

2.5.3

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.7

2 release files

2.4.6

2 release files

2.4.5

2 release files

2.4.4

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.10

2 release files

2.3.9

2 release files

2.3.8

2 release files

2.3.7

2 release files

2.3.6

2 release files

2.3.5

2 release files

2.3.4

2 release files

2.3.3

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.8

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.5.10

2 release files

1.5.9

2 release files

1.5.8

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.9

2 release files

1.4.8

2 release files

1.4.7

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page