Skip to content

Add support for --log-level argument to web UI + log format update#781

Merged
akuker merged 1 commit intoPiSCSI:developfrom
nucleogenic:webui-log-level
Aug 1, 2022
Merged

Add support for --log-level argument to web UI + log format update#781
akuker merged 1 commit intoPiSCSI:developfrom
nucleogenic:webui-log-level

Conversation

@nucleogenic
Copy link
Copy Markdown
Member

The web UI runs with its log level set to WARNING by default.

I was unable to find a way to change the log level without making a code change.

This change allows the log level to be set from the command line, and adds useful information to aid with troubleshooting.

Log format:

timestamp level file:line message

Example output:

2022-08-01 00:12:54,209 WARNING file_cmds.py:109 /home/pi/images/image_with_properties_test.zip is an invalid zip file
2022-08-01 00:12:54,219 WARNING file_cmds.py:109 /home/pi/images/RaSCSI-Boot-8.hda_.zip is an invalid zip file
2022-08-01 00:12:54,232 WARNING sys_cmds.py:96 Executed shell command: brctl show
2022-08-01 00:12:54,232 WARNING sys_cmds.py:97 Got error: brctl: No such operation show

Increase verbosity of web UI log format

Add critical to supported log levels for completeness
@akuker akuker merged commit 7a18939 into PiSCSI:develop Aug 1, 2022
@nucleogenic nucleogenic deleted the webui-log-level branch October 3, 2022 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants