1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-21 15:23:04 +00:00
12 Logging and Log Files
bakerboy448 edited this page 2021-04-11 00:33:49 -05:00

Note: this is the Legacy v2 Wiki. The new V3 Wiki can be found at the Servarr Wiki.

Location

The log files are located in Sonarr's AppData directory, inside the logs/ folder. You can also access the log files from the Sonarr UI at System -> Logs -> Files.

Note: The Logs Table in the UI is not the same as the log files and isn't as useful. If you're asked for logs, please copy/paste from the log files and not the table.

Sharing Logs

The logs can be long and hard to read as part of a forum or reddit post and they're spammy in IRC or Discord, so please use a pastebin. The whole file typically isn't needed, just a good amount of context from before and after the issue/error like in Manual Episode Search Trace Log. Don't forget to wait for spammy tasks like the RSS sync or library refresh to finish.

Trace/Debug Logs

You can change the log level at Settings -> General -> Logging. Sonarr does not need to restarted for the change to take effect. This change only effects the log files, not the logging database. The latest debug/trace log files are named sonarr.debug.txt and sonarr.trace.txt respectively.

images/Settings.General.Logging.v3.png

If you're unable to access the Sonarr UI to set the logging level you can do so by editing config.xml in the AppData directory by setting the LogLevel value to Debug or Trace instead of Info.

<Config>
  ...
  <LogLevel>debug</LogLevel>
  ...
</Config>

Clearing Logs

You can clear log files and the logs database directly from the UI, under System -> Logs -> Files and System -> Logs respectively.

Multiple Log Files

Sonarr uses rolling log files limited to 1MB each. The current log file is always sonarr.txt, for the the other files sonarr.0.txt is the next newest (the higher the number the older it is) up to 6 log files total. This log file contains fatal,error,warn and info entries.

When Debug log level is enabled, additional sonarr.debug.txt rolling log files will be present, up to 51 files. This log files contains fatal,error,warn,info and debug entries. It usually covers a 40h period.

When Trace log level is enabled, additional sonarr.trace.txt rolling log files will be present, up to 51 files. This log files contains fatal,error,warn,info,debug and trace entries. Due to trace verbosity it only covers a couple of hours.