Skip to main content

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.syslog_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

File details

Details for the file micropython_eydam-prototyping_logging-0.0.9.tar.gz.

File metadata

  • Download URL: micropython_eydam-prototyping_logging-0.0.9.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.2

File hashes

Hashes for micropython_eydam-prototyping_logging-0.0.9.tar.gz
Algorithm Hash digest
SHA256 0681a43dd9098a8bae329d49516caccdcf9d73373c8052525b16901fe252c193
MD5 4eb33dac8ce84a24632be949a42386c3
BLAKE2b-256 9b9ffd61cf9379922eb5560ecce97d9af1d07718452bab5ed31683738e8d3164

See more details on using hashes here.

Supported by

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