Time stamps on log files?

Is there a way to turn on time stamps on the log files?
It seems this is consistent across all ARRs that there are no date/time stamps on any of the log files.

tail sonarr.0.txt
   at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrentProxySelector.GetProxyCache(QBittorrentSettings settings, Boolean force) in ./Sonarr.Core/Download/Clients/QBittorrent/QBittorrentProxySelector.cs:line 72
   at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrentProxySelector.GetProxy(QBittorrentSettings settings, Boolean force) in ./Sonarr.Core/Download/Clients/QBittorrent/QBittorrentProxySelector.cs:line 62
   at NzbDrone.Core.Download.Clients.QBittorrent.QBittorrent.AddFromMagnetLink(RemoteEpisode remoteEpisode, String hash, String magnetLink) in ./Sonarr.Core/Download/Clients/QBittorrent/QBittorrent.cs:line 73
   at NzbDrone.Core.Download.TorrentClientBase`1.DownloadFromMagnetUrl(RemoteEpisode remoteEpisode, IIndexer indexer, String magnetUrl) in ./Sonarr.Core/Download/TorrentClientBase.cs:line 235
   at NzbDrone.Core.Download.TorrentClientBase`1.DownloadFromWebUrl(RemoteEpisode remoteEpisode, IIndexer indexer, String torrentUrl) in ./Sonarr.Core/Download/TorrentClientBase.cs:line 156
   at NzbDrone.Core.Download.TorrentClientBase`1.Download(RemoteEpisode remoteEpisode, IIndexer indexer) in ./Sonarr.Core/Download/TorrentClientBase.cs:line 124
   at NzbDrone.Core.Download.DownloadService.DownloadReport(RemoteEpisode remoteEpisode, IDownloadClient downloadClient) in ./Sonarr.Core/Download/DownloadService.cs:line 98
   at NzbDrone.Core.Download.DownloadService.DownloadReport(RemoteEpisode remoteEpisode, Nullable`1 downloadClientId) in ./Sonarr.Core/Download/DownloadService.cs:line 63
   at NzbDrone.Core.Download.ProcessDownloadDecisions.ProcessDecisionInternal(DownloadDecision decision, Nullable`1 downloadClientId) in ./Sonarr.Core/Download/ProcessDownloadDecisions.cs:line 203

docker logs --tail 5 sonarr

[Info] DownloadDecisionMaker: Processing 45 releases
[Info] Sabnzbd: Adding report [Series.S02E03.1080p.BluRay.x264] to the queue.
[Info] DownloadService: Report sent to SABnzbd-sonarr-tv. Indexer News (Prowlarr). Series.S02E03.1080p.BluRay.x264
[Info] EpisodeSearchService: Episode search completed. 1 reports downloaded.
[Info] BackupService: Starting Backup

Although SABNZB has timestamps and this is a common action in log files.
docker logs --tail 5 sabnzb

2024-01-19 12:51:21,157::INFO::[downloader:422] Post-processing finished, resuming download
2024-01-19 12:51:25,157::INFO::[nzbqueue:230] Saving queue
2024-01-19 12:51:25,159::INFO::[postproc:138] Saving postproc queue
2024-01-19 12:51:25,160::INFO::[notifier:137] Sending notification: SABnzbd - Queue finished (type=queue_done, job_cat=None)
2024-01-19 12:51:46,621::INFO::[database:232] [N/A] Removing job SABnzbd_nzo_4k3jnnu7 from history

Use the “-t” switch.

root@hda:~# docker logs --tail 5 -t sonarr
2024-01-20T08:41:19.984222091Z [Info] Sonarr.Http.Authentication.BasicAuthenticationHandler: Basic was not authenticated. Failure message: Authorization header missing.
2024-01-20T08:41:19.984241538Z [Info] Sonarr.Http.Authentication.BasicAuthenticationHandler: Basic was not authenticated. Failure message: Authorization header missing.
2024-01-20T08:41:20.353999070Z [Info] Sonarr.Http.Authentication.BasicAuthenticationHandler: Basic was not authenticated. Failure message: Authorization header missing.
2024-01-20T08:41:26.577179658Z [Info] Sonarr.Http.Authentication.BasicAuthenticationHandler: Basic was not authenticated. Failure message: Authorization header missing.
2024-01-20T08:41:46.582331828Z [Info] Sonarr.Http.Authentication.BasicAuthenticationHandler: Basic was not authenticated. Failure message: Authorization header missing.

1 Like

Those are the docker container logs, not sonarr logs. Sonarr logs do have timestamps but in your very first example you didn’t “tail” enough lines to see it because it happens to be the stack trace of an error. So the first line of the error will have a timestamp.

1 Like

Thank you for that info!
I wonder why sabnzb shows the logs by default for docker without the -t, but sonarr doesn’t?
I’d rather have a consistent command to run, but I’ll alias it if I have to.

docker logs --tail 5 sabnzb   # shows timestamps by default
docker logs --tail 5 sonarr   # doesn't show timestamps by default

You are correct, thank you. I just did a:
tail -f -n 100 sonarr.0.txt
and I see timestamps further up!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.