Closed quentin9696 closed 2 years ago
Just an update:
The message variable return the formatted code with ansi color balise. Do you know how to clean up ansicolor garbage to format correctly my message ?
It works when I don't use message variable.
Finally solve my issue.
As already mention, message
variable return the log entry formatted with ansicolor. I simply use isprint
method to cleanup non printable character since Loki return me 400
http code with message malformed json
when I keep those non printable characters
The problem
I try to make HTTP request on_message action with the logger component. This will help me to have a central logging with Loki, since I got a large number of device to manage.
This syntax don't works with logger component.
The same syntax works with a sensor, so it's not an issue with my Loki. Also, I capture network packets on my loki server and I can't see anything. I can get other packet comming from my ESP (prometheus metrics), so ESP is well connected on my wifi network and packets transit from it.
FYI, here is a working workflow with a basic DHT sensor:
Which version of ESPHome has the issue?
ESPHome version 2022.2.5
What type of installation are you using?
Docker
Which version of Home Assistant has the issue?
N/A
What platform are you using?
ESP32
Board
esp-wrover-kit
Component causing the issue
logger
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response