-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add timestamp/datetime to console logs #2069
Comments
Hello @Metal-Mighty, Could you please give some details about the issue, in my Azure Log management I am seeing correctly the timecreated of each log line (cf below) When using docker logs are you using the -t option? For me this seems to add the timestamp as expected. Let me know if I am missing something or if you would want to discuss this orally |
Hi ! Since we don't always have a SSH access to our IoT Edge machines, we usually use the Troubleshoot view on the Azure Edge Device modules as a last resort (which happens more often than we'd like...) and it doesn't display the timestamps. I don't think I have ever seen this log view, is that related to the observability implementation described in the documentation? I didn't know the |
As far as I know Docker generates timestamps attached to each logs, this is how the -t command (and the Azure monitor) is able to get the emission time. The screenshot above is coming from our CI using Azure monitor (I think you are using ELK and not Azure monitor). I am not a filebeat specialist, but based on diverse articles, it seems that filebeat do take the docker timestamp by default (source : https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-container.html), can you paste your logfile config here to compare? Are you sure you don't have this timestamp field exposed in your logs? I would recommend asking this question to a filebeat specialist as it is not a technology I am very familiar with. |
Ah there might be a misunderstanding: we don't have any issue when publishing the logs in our ELK, but they aren't always deployed in our production environments. That's why we rely a lot on the Troubleshoot screen in the Aure IoT Hub's Edge Devices, even more so when we don't have a direct access to the clients' machines (mainly due to security), and why the lack of timestamps on this particular screen can impact us. |
Is your feature request related to a problem? Please describe.
The lack of timestamps in the LNS logs sometimes makes it hard to debug issues while using Azure's troubleshooting tools or Docker containers logs.
Describe the solution you'd like
Pending a possible implementation of log formatters (see #1131), a date/time before the actual log would help a lot.
I would expect it to be in UTC for consistency across various timezones.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: