ARCOR2 Logger service.
Project description
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 levelinfo
and higher are logged.- Other possible values are
warning
,error
anddebug
.
- Other possible values are
ARCOR2_LOGGER_DEBUG=1
- switches logger to theDEBUG
level.ARCOR2_LOGGER_ASYNCIO_DEBUG=1
- turns onasyncio
debug output (helpful to debug problems related to concurrency).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
arcor2_logger-0.1.0.tar.gz
(4.6 kB
view hashes)
Built Distributions
Close
Hashes for arcor2_logger-0.1.0-py310-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b827b942c847416fbf4aeeff0ba7d6c437d9fa9633b5b0eebc069ba3d2301824 |
|
MD5 | 9b4e6c8637413eb19a561ed959b9dc11 |
|
BLAKE2b-256 | 576ee70fc595fba8e40c95c57ec7d3626f1768b6445c70777bb80ff2a40de652 |
Close
Hashes for arcor2_logger-0.1.0-py38-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0073845705322072f63c3e14a3a7bdb35614d87627edc2fe5d9df998122bc17f |
|
MD5 | 96d45e4890ee2329a6025257529cbd6c |
|
BLAKE2b-256 | 3579ad455cca1f8e8a096f6d7b962060251a1748acda288db561bfe863dddd36 |