![]() ![]() Ģ 09:55:18 Initializing device Button-2EDC0CA5D4ED71EF. My use case is, (right now) not tailored for consuming the logs, but this would be a nice benefit with modern tools like Prometheus/Kibana.Ģ 09:55:18 Initializing connection RaspberryPi-4FB3E01F6643C509. When I start gobot, it outputs a lot of logging (which is great), but having my app + gobot outputting different styles of logs (structured and unstructured) makes it hard to read the logs and operate it in case of issues. I have also a branch prepared with structured logging, see ![]() In the master branch, I have traditional logging (see ). I have a small golang application ( things-with-buzzers-websocket) that listens to the GPIO of raspberry pi, get the signals and pushes those out via a WebSocket. If this would be the case, it leads to a lot of adjustments. I thought the goal is also to have it configurable if you want to use the current ( log) structure or the "new" / structured logging approach. I am not 100% aware of the internal structure of gobot (yet).Īs for structured, once you have log as being actual Logrus, you can just use WithFields, no? In any case, you'd want those legacy calls to log to use the same configuration as the more sophisticated stuff in your Work function.ĭo you have examples of call sites in drivers or adaptors or whatever that you'd like to see converted to some particular structured calls? Many of the calls in Gobot (nearly all?) would need significant re-working to conform to some structured was just pointing out that you'd need to plumb it all the way into the driver level Afaict the only real issue here is being able to have the same logging lib/instance in place whether the call site is in your Work (where you have control of what's emitted), or in a driver/adaptor, (where you don't). I'm still not understanding completely what you want to do wrt structured logging that you couldn't just do in your own code when you're making a Robot's function for Work. As for structured, once you have log as being actual Logrus, you can just use WithFields, no? ![]() Something like the above PR would be part of this afaik. Yeah I was just pointing out that you'd need to plumb it all the way into the driver level. ![]()
0 Comments
Leave a Reply. |