Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature/logging #4

Merged
merged 2 commits into from
Jan 9, 2024
Merged

Feature/logging #4

merged 2 commits into from
Jan 9, 2024

Conversation

JPHutchins
Copy link
Collaborator

This PR adds logging that can be set by --loglevel <level> and --logfile <file>. If --logfile is omitted, then no log file is created.

smpmgr --help
                                                                                                                      
 Usage: smpmgr [OPTIONS] COMMAND [ARGS]...                                                                            
                                                                                                                      
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --port                      TEXT                                        The serial port to connect to, e.g. COM1,  │
│                                                                         /dev/ttyACM0, etc.                         │
│                                                                         [default: None]                            │
│ --timeout                   FLOAT                                       Transport timeout in seconds; how long to  │
│                                                                         wait for requests                          │
│                                                                         [default: 2.0]                             │
│ --loglevel                  [CRITICAL|ERROR|WARNING|INFO|DEBUG|NOTSET]  Debug log level [default: WARNING]         │
│ --logfile                   PATH                                        Log file path [default: None]              │
│ --install-completion                                                    Install completion for the current shell.  │
│ --show-completion                                                       Show completion for the current shell, to  │
│                                                                         copy it or customize the installation.     │
│ --help                                                                  Show this message and exit.                │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ image         The SMP Image Management Group.                                                                      │
│ os            The SMP OS Management Group.                                                                         │
│ upgrade       Upload a FW image, mark it for next boot, and reset the device.                                      │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

@JPHutchins JPHutchins merged commit 58e2bdd into main Jan 9, 2024
4 checks passed
@JPHutchins JPHutchins deleted the feature/logging branch January 9, 2024 04:12
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants