arcor2_logger
The service provides logging capabilities through the network. Logging-related methods are added to ObjectTypes using a mixin class.
- Messages are sent using the websockets protocol.
- Calls to
log_methods are non-blocking.
Example usage
from typing import Optional
from arcor2.object_types.abstract import Generic, Settings
try:
from .logging_mixin import LoggingMixin # this is used within an execution package
except ImportError:
from arcor2_logger.object_types.logging_mixin import LoggingMixin # this is used during development
class MyObject(LoggingMixin, Generic):
_ABSTRACT = False
def __init__(self, obj_id: str, name: str, settings: Optional[Settings] = None) -> None:
super().__init__(obj_id, name, settings)
self.logger = self.get_logger()
self.logger.info("Initialized.")
Environment variables
ARCOR2_LOGGER_URL=ws://0.0.0.0:8765- by default, the service listens on port 8765.ARCOR2_LOGGER_LEVEL=info- by default, messages from objects with levelinfoand higher are logged.- Other possible values are
warning,erroranddebug.
- Other possible values are
ARCOR2_LOGGER_DEBUG=1- switches logger to theDEBUGlevel.ARCOR2_LOGGER_ASYNCIO_DEBUG=1- turns onasynciodebug output (helpful to debug problems related to concurrency).
Changelog
The format is based on Keep a Changelog,
[0.2.0] - 2024-04-11
Changed
- Updated dependencies, switched to Python 3.11.
[0.1.0] - 2022-10-28
Changed
- First version of the package.
Metadata
Release files for arcor2-logger 0.2.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 |
|---|---|---|---|---|
| arcor2_logger-0.2.0.tar.gz | 5.1 kB | Without provenance | Details for arcor2_logger-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| arcor2_logger-0.2.0-py311-none-any.whl | Python 3.11 | none | any | Details for arcor2_logger-0.2.0-py311-none-any.whl |
Total release size: 11.3 kB
Release files / arcor2_logger-0.2.0.tar.gz
| Download URL | arcor2_logger-0.2.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ea3f40d21d84774552da00b265a886ff2175318f28245e9e92c76ac5deb18b9
|
|
BLAKE2b-256 checksum How to use checksums |
a8c3f84822237ec908d311c2f6d952c0ac203241dc9b6986f326a06a1de3a204
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / arcor2_logger-0.2.0-py311-none-any.whl
| Download URL | arcor2_logger-0.2.0-py311-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3.11 |
|
SHA-256 checksum How to use checksums |
c1ddaa6731815d27d8aa6b75419e72be26e0e1a2955926f7597557d1df4e5461
|
|
BLAKE2b-256 checksum How to use checksums |
ffe2908ef825ba53590d8a5c39b79a6147d04e5e01ef779c2cce6cdbbc08b5dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for arcor2-logger 0.2.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.