Skip to main content

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 level info and higher are logged.
    • Other possible values are warning, error and debug.
  • ARCOR2_LOGGER_DEBUG=1 - switches logger to the DEBUG level.
  • ARCOR2_LOGGER_ASYNCIO_DEBUG=1 - turns on asyncio debug 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.

Project details


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.2.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

arcor2_logger-0.2.0-py311-none-any.whl (6.2 kB view details)

Uploaded Python 3.11

File details

Details for the file arcor2_logger-0.2.0.tar.gz.

File metadata

  • Download URL: arcor2_logger-0.2.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for arcor2_logger-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0ea3f40d21d84774552da00b265a886ff2175318f28245e9e92c76ac5deb18b9
MD5 5a17e9312826795c21b1ee1b7ac27eed
BLAKE2b-256 a8c3f84822237ec908d311c2f6d952c0ac203241dc9b6986f326a06a1de3a204

See more details on using hashes here.

File details

Details for the file arcor2_logger-0.2.0-py311-none-any.whl.

File metadata

File hashes

Hashes for arcor2_logger-0.2.0-py311-none-any.whl
Algorithm Hash digest
SHA256 c1ddaa6731815d27d8aa6b75419e72be26e0e1a2955926f7597557d1df4e5461
MD5 14a54fe2ffc033de28dfff1ad4d12cd2
BLAKE2b-256 ffe2908ef825ba53590d8a5c39b79a6147d04e5e01ef779c2cce6cdbbc08b5dc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page