voorkant / voorkant-core

https://voorkant.org/
MIT License
2 stars 3 forks source link

Initial logger and example logline at startup #55

Closed cyclops1982 closed 5 months ago

cyclops1982 commented 6 months ago

This is for #28

An initial start, with nothing fancy for now.

We will have to change this at a later stage, because not everything has a std::cerr/std::cout that is convenient.

Would also be good to have a 'source' so that we can understand /where/ the logline comes from.

Habbie commented 5 months ago

oh, and we should repair register.sh, but it's not urgent. Now looks like this:

HA_WS_URL=ws://localhost:8123/api/websocket HA_API_TOKEN=2024-01-31 13:54:24 [INFO][main in ../src/main.cpp:38]Starting!
2024-01-31 13:54:24 [INFO][main in ../src/main.cpp:42]Connected to HA succesfully!
2024-01-31 13:54:24 [DEBUG][main in ../src/main.cpp:43]Connected to HA succesfully!
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIzYTA2ZjEzNTgzMjQ0Mjc2OWMxMjFkYWJiYjZhN2U4ZSIsImlhdCI6MTcwNjcwNTY2NCwiZXhwIjoxNzM4MjQxNjY0fQ.wGC8am3YDXkggop0Ij9kxmZiFJGeTwnWXlWV7ibY9XA