arcor2-logger-0.1.0
توضیحات
ARCOR2 Logger service.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | arcor2-logger-0.1.0 |
| نام | arcor2-logger |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Robo@FIT |
| ایمیل نویسنده | imaterna@fit.vut.cz |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/arcor2-logger/ |
| مجوز | LGPL |
# 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
```python
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).
نیازمندی
| مقدار | نام |
|---|---|
| ==0.6.1 | aiologger |
| ==2021.8.1 | aiorun |
| ~=0.22.0 | arcor2 |
| ==2.15.0 | dataclasses-jsonschema[apispec,fast-validation] |
| ==1.2.1 | websocket-client |
| ==10.0 | websockets |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| ==3.8.* | Python |
نحوه نصب
نصب پکیج whl arcor2-logger-0.1.0:
pip install arcor2-logger-0.1.0.whl
نصب پکیج tar.gz arcor2-logger-0.1.0:
pip install arcor2-logger-0.1.0.tar.gz