Command-Line Interface
errortools ships two CLI entry points: python -m errortools for package information, and logger for emitting log messages from the shell.
Installation
Both commands become available after installing the package:
pip install errortools
errortools command
Display package metadata and run tests.
Usage
python -m errortools [OPTIONS]
Options
Option |
Short |
Description |
|---|---|---|
|
|
Show version and exit |
|
|
Show copyright information |
|
|
Show author name |
|
|
Show author email |
|
|
Show license type |
|
|
Show project URL |
|
|
Show all package information |
|
Run the test suite using pytest |
Examples
# Print version
$ python -m errortools -v
v3.1.2
# Print all metadata
$ python -m errortools -i
errortools vx.x.x
errortools - a toolset for working with Python exceptions and warnings and logging.
Author: Evan Yang <quantbit@126.com>
License: MIT
URL: https://github.com/more-abc/errortools
Copyright: Copyright 2026 (C) aiwonderland Evan Yang
# Run the test suite
$ errortools --run-tests
...
logger command
Emit a single log message from the command line using the errortools structured logger.
Usage
logger MESSAGE [OPTIONS]
Options
Option |
Short |
Description |
|---|---|---|
|
|
Log level: |
|
|
Output stream: |
Examples
# Info-level message (default)
$ logger "Deployment complete"
# Error-level message
$ logger "Connection failed" -l error
# Write to stdout instead of stderr
$ logger "Build started" -l info -o stdout