Skip to main content
pip install microlog

microlog

Simple and lightweight logging

Getting started

from microlog import Logger
my_logs = Logger()
my_logs.log("Hello World!")
  • Logs can be created with the following methods
    • log()
    • debug()
    • info()
    • warning()
    • error()
    • critical()
  • Logs from a current session are saved in memory and can be viewed with the logs() method.

Options

There are three options available when creating a new Logger instance.

1. File

By default a log file will not be created when creating a new Logger instance. Set the file parameter to True and a log file will be created in the current directory. You may provide a custom name for the log file by setting the file parameter to a string value.

Logger(file = "my_logs")

Logs are written using the append option so they can be added to existing log files.

2. Console

Log messages will be written to the console by default. Set the console parameter to False to stop seeing log messages in the console.

Logger(console = False)

You can change this status using the console() method.

my_logs.console(False)

3. Time format

All references to time will be local date-time by default. To use a UTC timestamp, set the ts parameter to True. This will apply to default log file names and times in the log files.

Logger(ts = True)

Metadata

Release files for microlog 0.1.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 microlog 0.1.0
File Size Uploaded Provenance
microlog-0.1.0.tar.gz 2.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 6.3 kB

Release files / microlog-0.1.0.tar.gz

Download URL microlog-0.1.0.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0f5ed0687b27e23a464fa146e9f5fabf1280038f00eaa14efa2d5392178ac902
BLAKE2b-256 checksum
How to use checksums
7f5934303cb3d74c708f28666bdf58cccc3481e104601a3cc64eac2bd15578f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.0

Release files / microlog-0.1.0-py3-none-any.whl

Download URL microlog-0.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54b195af163529bfa54097e22bdc76b24dca0525729ac8f8d03df87c5bfa7ec5
BLAKE2b-256 checksum
How to use checksums
c7c6fa63b8debd3b7d6f3a0ae8364d2759a7e723099d954378e87a914f40fd9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.0

Security for microlog 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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