MCAP Logger 🧢
Project description
This python package to provide a standardised, easy to import and use logging method.
The package is...
- a logger module that leverages the existing MCAP and Foxglove packages
- provides a plugin for standard Python loging
Links:
Example usage
Installing the library
pip install mcap-logger
Creating a simple log
import logging
from pathlib import Path
from mcap_logger.mcap_handler import McapHandler
def main(): # noqa: ANN201
log_file = Path("hello.mcap")
mcap_handler = McapHandler(log_file)
mcap_handler.setLevel("DEBUG")
logger = logging.getLogger("mcap_logger")
logger.addHandler(mcap_handler)
logger.setLevel("DEBUG")
logger.info("Hello from mcap-logger-tutorial!")
Log Protobuf data
ℹ️ Protocol buffers are Google's language-neutral mechanism for serializing structured data. More info about it and its syntax: Protocol Buffers
from sensor_data_pb2 import SensorData
from mcap_logger.topic_logger import TopicLogger
log_file = Path("hello.mcap")
mcap_handler = McapHandler(log_file)
mcap_handler.setLevel("DEBUG")
logger = logging.getLogger("mcap_logger")
logger.addHandler(mcap_handler)
logger.setLevel("DEBUG")
# Log Protobuf data
sensor_message = SensorData(temperature=25, humidity=65)
TopicLogger("mcap_logger").topic("/sensor_data").write(sensor_message)
Call for Contributions
The MCAP-Logger project welcomes your expertise and enthusiasm!
Metadata
Release files for mcap-logger 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcap_logger-1.0.0.tar.gz | 7.5 kB | With provenance | Details for mcap_logger-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcap_logger-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for mcap_logger-1.0.0-py3-none-any.whl |
Total release size: 13.4 kB
Release files / mcap_logger-1.0.0.tar.gz
| Download URL | mcap_logger-1.0.0.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b87c78b55d4ccebcce3e33441410af2688cd66a0a448d645ab5d9f5c64822c0
|
|
BLAKE2b-256 checksum How to use checksums |
a5d17880dc63390096d3e4eced8e7a7a5be0ec9810b69005ad863ec9eeea151f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2024.
Transparency logRelease files / mcap_logger-1.0.0-py3-none-any.whl
| Download URL | mcap_logger-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d8f11315e51a187b1daf6aa33ae57c7dbe157fa1c7e64432e81e25759279869
|
|
BLAKE2b-256 checksum How to use checksums |
ed9eb5c4f078057d7eca7c98683553e7c485bd5ff618684e2674ad02be89426c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2024.
Transparency logSecurity for mcap-logger 1.0.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mcap_logger-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2024.
Transparency logA 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.