Some logging functions for MicroPython in combination with syslog-server
Project description
Eydam-Prototyping: ep_logger
Deutsche Version hier / German version here
Library, to send log messages from an IoT-Device running MicroPython to a syslog-server. How to setup a syslog-server in combination with Telegraf and Grafana is described here: here
The messages will be send in ietf-syslog-protocol-23-format.
Example:
# Syslog-Server (192.168.178.100) is listening on 514 (UDP)
import ep_logging
logger = ep_logging.logger("192.168.178.100", port=514)
logger.notice("Test")
This Code would produce the following message:
<85>1 2021-01-20T20:33:17.0Z esp32 logger - - Test
-- - ---------------------- ----- ------ - - ----
| | | | | | | +--- message
| | | | | | +------- MSGID (=None)
| | | | | +--------- PROCID (=None)
| | | | +------------- appname
| | | +-------------------- hostname
| | +----------------------------------- timestamp
| +----------------------------------------------- version (always 1)
+------------------------------------------------- facility + servity
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
Built Distribution
Close
Hashes for micropython_eydam-prototyping_logging-0.0b3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92246c402b5bea6d626ce3de9651719b403cc2f1ebc580d6007f0b6f2a1a20e2 |
|
MD5 | b94104b30bc3fd6c055b0082c49032b8 |
|
BLAKE2b-256 | 1c5e959fb49ae6bcface2cda66a9c4c7d508ef14ef92f2b41b990fe8588bda64 |
Close
Hashes for micropython_eydam_prototyping_logging-0.0b3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce0aa72fa58e25d477fb941dcc3dc6a0ec63aa58343c0d0126bfe0d1380c1bbe |
|
MD5 | 659af190da4c61f89002ee6b05d5f4f3 |
|
BLAKE2b-256 | da2f023e82233adb545e8f67c38b1ed0da0ccb3d4d129b241c63505dfae81468 |