Skip to main content

micro-logger

A JSON logger made for microservices

Usage

import micro_logger

# This overrides the root logger as well

logger = micro_logger.getLogger("my-service")

logger.info("sure", extra={"a": 1})

Testing

import micro_logger_unittest

import micro_logger

# Use this class as a base

class TestUnitTest(micro_logger_unittest.TestCase):

    # Override for all tests

    @unittest.mock.patch("micro_logger.getLogger", micro_logger_unittest.MockLogger)
    def setUp(self):

        self.logger = micro_logger.getLogger("unit")

    # Any test can check for logging

    def test_assertLogged(self):

        self.logger.info("sure", extra={"a": 1})

        self.assertLogged(self.logger, "info", "sure", extra={"a": 1})

Metadata

Release files for micro-logger 0.1.4

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

Source distribution (sdist)

Source distribution for micro-logger 0.1.4
File Size Uploaded Provenance Actions
micro-logger-0.1.4.tar.gz 4.5 kB Without provenance Details for micro-logger-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for micro-logger 0.1.4
File Interpreter ABI Platform Actions
micro_logger-0.1.4-py3-none-any.whl Python 3 none any Details for micro_logger-0.1.4-py3-none-any.whl

Total release size: 8.6 kB

Release files / micro-logger-0.1.4.tar.gz

Download URL micro-logger-0.1.4.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
12e8536b81e0fb620ae562c3f24866019a0198f9194193a45f95001f932df754
BLAKE2b-256 checksum
How to use checksums
54bceb2b4933202764fa8b40a7a24df50eab1a4c5083dc05a63a061f98a3ceb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.5

Release files / micro_logger-0.1.4-py3-none-any.whl

Download URL micro_logger-0.1.4-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4420f632b66c6f64cb53a653d5fe26b6002e4d307d6e66bd5dc09c02eec93fdf
BLAKE2b-256 checksum
How to use checksums
7446bc826a82b8021b276083e0496ada740e85f6d1026ec9770dfe6a2998f77a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.5

Security for micro-logger 0.1.4

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