Skip to content

Commit

Permalink
new feature: now supports --debug --debug as well as 2 values for --l…
Browse files Browse the repository at this point in the history
…og-level

- new feature: -d -d sets log level of itself and all lower level modules to debug
- new feature: --log-level value1 value2 where level1 sets log level for matrix-commander-rs
  and second value sets log level of lower level modules
- also just -d works better now (less info)
- fixed bug: where private access token was printed to debug log, now *** being printed to debug log
- fixed bug: return value should be correct now (0 for success, 1 for error)
  • Loading branch information
8go committed Sep 16, 2024
1 parent 2836a28 commit 21ddb1f
Show file tree
Hide file tree
Showing 7 changed files with 656 additions and 361 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[package]
name = "matrix-commander"
version = "0.8.0"
version = "0.9.0"
edition = "2021"
description = "simple but convenient CLI-based Matrix client app for sending and receiving"
documentation = "https://docs.rs/matrix-commander"
Expand Down
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,20 +163,27 @@ Options:
default log level set with environment variable 'RUST_LOG' will be
used. If used, log level will be set to 'DEBUG' and debugging
information will be printed. '-d' is a shortcut for '--log-level
DEBUG'. See also '--log-level'. '-d' takes precedence over
'--log-level'. Additionally, have a look also at the option
'--verbose'
--log-level <LOG_LEVEL>
DEBUG'. If used once as in '-d' it will set and/or overwrite
--log-level to '--log-level debug'. If used twice as in '-d -d' it
will set and/or overwrite --log-level to '--log-level debug debug'.
And third or futher occurance of '-d' will be ignored. See also
'--log-level'. '-d' takes precedence over '--log-level'.
Additionally, have a look also at the option '--verbose'
--log-level <LOG_LEVEL>...
Set the log level by overwriting the default log level. Details:: If
not used, then the default log level set with environment variable
'RUST_LOG' will be used. See also '--debug' and '--verbose'. An
'RUST_LOG' will be used. If used with one value specified this value
is assigned to the log level of matrix-commander-rs. If used with two
values specified the first value is assigned to the log level of
matrix-commander-rs. The second value is asigned to the lower level
modules. More than two values should not be specified. --debug
overwrites -log-level. See also '--debug' and '--verbose'.
Alternatively you can use the RUST_LOG environment variable. An
example use of RUST_LOG is to use neither --log-level nor --debug,
and to set RUST_LOG="error,matrix_commander_rs=debug" which turns off
debugging on all lower level modules and turns debugging on only for
matrix-commander-rs
[default: none]
Possible values:
- none: None: not set, default
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.0
0.9.0
23 changes: 15 additions & 8 deletions help.manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,27 @@ Options:
default log level set with environment variable 'RUST_LOG' will be
used. If used, log level will be set to 'DEBUG' and debugging
information will be printed. '-d' is a shortcut for '--log-level
DEBUG'. See also '--log-level'. '-d' takes precedence over
'--log-level'. Additionally, have a look also at the option
'--verbose'

--log-level <LOG_LEVEL>
DEBUG'. If used once as in '-d' it will set and/or overwrite
--log-level to '--log-level debug'. If used twice as in '-d -d' it
will set and/or overwrite --log-level to '--log-level debug debug'.
And third or futher occurance of '-d' will be ignored. See also
'--log-level'. '-d' takes precedence over '--log-level'.
Additionally, have a look also at the option '--verbose'

--log-level <LOG_LEVEL>...
Set the log level by overwriting the default log level. Details:: If
not used, then the default log level set with environment variable
'RUST_LOG' will be used. See also '--debug' and '--verbose'. An
'RUST_LOG' will be used. If used with one value specified this value
is assigned to the log level of matrix-commander-rs. If used with two
values specified the first value is assigned to the log level of
matrix-commander-rs. The second value is asigned to the lower level
modules. More than two values should not be specified. --debug
overwrites -log-level. See also '--debug' and '--verbose'.
Alternatively you can use the RUST_LOG environment variable. An
example use of RUST_LOG is to use neither --log-level nor --debug,
and to set RUST_LOG="error,matrix_commander_rs=debug" which turns off
debugging on all lower level modules and turns debugging on only for
matrix-commander-rs

[default: none]

Possible values:
- none: None: not set, default
Expand Down
Loading

0 comments on commit 21ddb1f

Please sign in to comment.