Cargo Features
nolog has no features set by default.
[dependencies]
nolog = { version = "1.0.19", features = ["release", "logonly", "logmod", "logcatch", "tofile", "no_auto_flush", "show_lvl_header_kv", "plain", "indent_ignore_all", "indent_base_zero", "indent_base_two", "indent_base_four", "indent_base_seven", "indent_base_nine", "indent_base_ten", "indent_kv_default_zero", "indent_kv_default_two", "indent_kv_default_four", "indent_kv_default_seven", "indent_kv_default_nine", "indent_kv_default_ten", "newline_ignore", "all", "trace", "debug", "info", "warn", "error", "crit", "location_hide", "location_style_classic", "custom_leading", "custom_after_msg", "custom_sep", "custom_location_style", "custom_writelog_inner", "custom_msg_render", "sep_colon", "sep_space", "sep_hide", "glob", "log_enabled"] }
- release
-
-----------------------------------------------------------------------------
Don't disable logger in release build
-----------------------------------------------------------------------------Affects
nolog::core
,nolog::tofile
,nolog::logonly
,nolog::level_logonly
,nolog::logcatch
,nolog::logmod
,nolog::level_logmod
,nolog::glob
,nolog::log_enabled
,nolog::level_logonly_and_logmod
… - logonly = glob, log_enabled
-
-----------------------------------------------------------------------------
Filtering
-----------------------------------------------------------------------------Affects
nolog::logonly
,nolog::level_logonly
,nolog::level_logonly_and_logmod
… - logmod = glob
-
Affects
nolog::logmod
,nolog::level_logmod
,nolog::level_logonly_and_logmod
… - logcatch = glob
-
Affects
nolog::logcatch
… - tofile = glob, plain
-
-----------------------------------------------------------------------------
Log to file (to stderr by default)
-----------------------------------------------------------------------------
Enable log to file, disable log to stderrAffects
nolog::tofile
… - no_auto_flush
-
Don't
.flush()
after every message - show_lvl_header_kv
-
Level headers
Show level name for key-value:
CRIT: Key: value [src/main.rs 90:5]
^^^^It's disabled by default:
Key: value [src/main.rs 90:5]
- plain tofile?
-
Colors
nolog
colored by default, use this feature for plain output - indent_ignore_all
-
-----------------------------------------------------------------------------
Indents. 1 indent = 1 space.
-----------------------------------------------------------------------------
Ignore all indents - indent_base_zero
-
Base indents
0 indents ("indent_base_zero"):
Running
target/debug/app``DEBG: Message [src/main.rs 83:5]
6 indents (default):
Running
target/debug/app``DEBG: Message [src/main.rs 83:5]
^^^^^^ 6 indents added - indent_base_one indent_base_two
- indent_base_three indent_base_four
- indent_base_five indent_base_seven
- indent_base_eight indent_base_nine
- indent_base_ten
- indent_kv_default_zero
-
Key-value default indents (6 by default)
debug!(->[0] "Message");
--> 0 indent (passed by user)debug!("Message");
---------> 6 indent (default) - indent_kv_default_one indent_kv_default_two
- indent_kv_default_three indent_kv_default_four
- indent_kv_default_five indent_kv_default_seven
- indent_kv_default_eight indent_kv_default_nine
- indent_kv_default_ten
- newline_ignore
-
-----------------------------------------------------------------------------
Newline
----------------------------------------------------------------------------- - all = crit, debug, error, info, trace, warn
-
-----------------------------------------------------------------------------
Level filtering implementation
----------------------------------------------------------------------------- - trace all? = crit, debug, error, info, warn
- debug all? trace? = crit, error, info, warn
- info all? debug? trace? = crit, error, warn
- warn all? debug? info? trace? = crit, error
- error all? debug? info? trace? warn? = crit
- crit all? debug? error? info? trace? warn?
- location_hide
-
Location
[src/main.rs 155:9]
Don't show location
[src/main.rs 155:9]
- location_style_classic
-
like this:
[src/main.rs 155:9]
- custom_leading
-
-----------------------------------------------------------------------------
Customization
----------------------------------------------------------------------------- - custom_before_msg custom_after_msg
- custom_trailing custom_colors custom_sep
- custom_lvl_headers custom_location_style
- custom_writelog custom_writelog_inner
- custom_msg_render
- sep_colon
-
-----------------------------------------------------------------------------
Separator. Default = "⧽ "
-----------------------------------------------------------------------------
": " - sep_space
-
" "
- sep_hide
-
""
- glob logcatch? logmod? logonly? tofile?
-
-----------------------------------------------------------------------------
Dev features
-----------------------------------------------------------------------------Affects
nolog::glob
… - log_enabled logonly?
-
Affects
nolog::log_enabled
…