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.0b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 597e6fc14b018858246c8d33b5b11698e10fdc2b74b29e8e2bd9462b7aed7a76 |
|
MD5 | 253607cbc7a582fe945876495b7a489a |
|
BLAKE2b-256 | 25e8d49a89b679fb01223b7ba587ed8ab6dce00af52321e41182681e209a06c2 |
Close
Hashes for micropython_eydam_prototyping_logging-0.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cccc861957faffcf5eb6483da3d8cd228150dce8f268c6a13daf38cb572844ef |
|
MD5 | 4de532d7aa06cecf301cc376cde97efd |
|
BLAKE2b-256 | c82d432d0dfa91128f17ed07fb83b6210d5f1ed77289ce88ec76f969cd59834a |