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.0b0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e0ec7f94ac31a7f4d098e959dfc74532f92578dbaa977e7b717b51c380c2cc1 |
|
MD5 | c86ebca983b10de3130935451ca3378b |
|
BLAKE2b-256 | 7e0f600cba70808abfa0a2f6d45e94ec6fabcc39f678c2964b26478e27713cf7 |
Close
Hashes for micropython_eydam_prototyping_logging-0.0b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2328213bcd42893b726a6a2a5c73ea5f1825ec866c121d2456aa6f2dc03ceece |
|
MD5 | 53d7c9347435e017b8376f7a18d1877c |
|
BLAKE2b-256 | 6d65dd88fbc77f8e5fe81fadcb386ecffd563352a5ad9f47aeaa6292f7465268 |