brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: unraid-api restart --log-level debug gives you the API logs worth reading

Unraid
~/tips/tip-unraid-api-logs-log-level

unraid-api restart --log-level debug

Restart the Unraid API with a higher log level and read the tail of its log.

When something in the newer parts of the WebGUI acts up, the Unraid API service is often the thing behind it. Its default logs are polite and short. For a real look you want it to talk more.

The API has its own command line tool, and every command follows the pattern unraid-api <command> [options]. Two of them belong together:

unraid-api restart --log-level debug
unraid-api logs -l 300

The first restarts the service with a chattier log level. The docs list the levels as trace, debug, info, warn, error and fatal. The second shows the API logs, and -l (or --lines) sets how many lines it tails. Leave it out and you get the default of 100.

If you prefer an environment variable, the docs give that route too:

LOG_LEVEL=trace unraid-api restart

My advice is to start at debug and only go to trace when debug still tells you nothing. Trace is the level where you scroll for a long time to find one useful line. Reproduce the problem in the WebGUI, then run the logs command right after, so the interesting part is still inside the lines you tail.

The caveat is that the level you pass applies to the service you just restarted. When you are done, restart it once more with --log-level info or a plain unraid-api restart, or you keep writing a very talkative log for no reason.

Further reading: Unraid docs: CLI commands

More Unraid tips Change the RAID profile of a Unraid BTRFS pool with Balance Replace a disk in a redundant Unraid pool from the Main tab Test every Unraid drive with the DiskSpeed container See the XML behind a VM with the inline XML view in Unraid 7 Choose where a new VM's disk image is created with Unraid's storage override All Unraid tips (77) All topics

Link