Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexmohr/yal
Simple logger for arduino (currently only tested on ESP8266) fully written in C++. Supports serial and MQTT appenders out of the box. More appenders can be added easily
https://github.com/alexmohr/yal
arduino arduino-library esp8266 mqtt platformio
Last synced: about 1 month ago
JSON representation
Simple logger for arduino (currently only tested on ESP8266) fully written in C++. Supports serial and MQTT appenders out of the box. More appenders can be added easily
- Host: GitHub
- URL: https://github.com/alexmohr/yal
- Owner: alexmohr
- Created: 2022-05-09T21:06:36.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-07-18T15:36:35.000Z (over 2 years ago)
- Last Synced: 2023-02-26T05:08:19.326Z (almost 2 years ago)
- Topics: arduino, arduino-library, esp8266, mqtt, platformio
- Language: C++
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# YAL (Yet another logger)
This repo contains a logger library which I created for my personal arduino / ESP projects
This logger requires C++17 and thus a specific xtensa and platformio
version has to be used.### ESP8266
In your `platformio.ini` insert the following lines:```ini
build_flags =
-std=gnu++17
-DYAL_ARDUINO_SUPPORT=true
```
* YAL_ARDUINO_SUPPORT must set so `yal` is not defining arduino functions
which are normally defined for testing
* -std=gnu++17 sets the compiler compatibility to C++17The pinned version is necessary to have the correct compiler versions
for C++17 support.An example platformio project can be found in the `platformio` subfolder
### Other platforms
No official support for other platforms exist.
If you need support, feel free to open an issue.## Available Loggers
* Arduino MQTT
* This depends on the `MQTT` library
* Arduino Serial
* No deps are required## Format
Each appender can be configured with its own format.Possible options are:
* `%t` time
* `%m` message
* `%c` context
* `%l` levelFor example to configure a format which prints the level and the message
The format defaults to `[%t][%l][%c] %m`.
If no context is given for an appender `default` will be used