File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -67,11 +67,24 @@ pub fn init_env_logger(env: &str) -> Result<(), Error> {
6767 Err ( VarError :: NotUnicode ( _value) ) => return Err ( Error :: NonUnicodeColorValue ) ,
6868 } ;
6969
70+ let verbose_entry_exit = match env:: var_os ( String :: from ( env) + "_ENTRY_EXIT" ) {
71+ None => false ,
72+ Some ( v) => {
73+ if & v == "0" {
74+ false
75+ } else {
76+ true
77+ }
78+ }
79+ } ;
80+
7081 let layer = tracing_tree:: HierarchicalLayer :: default ( )
7182 . with_writer ( io:: stderr)
7283 . with_indent_lines ( true )
7384 . with_ansi ( color_logs)
7485 . with_targets ( true )
86+ . with_verbose_exit ( verbose_entry_exit)
87+ . with_verbose_entry ( verbose_entry_exit)
7588 . with_indent_amount ( 2 ) ;
7689 #[ cfg( parallel_compiler) ]
7790 let layer = layer. with_thread_ids ( true ) . with_thread_names ( true ) ;
You can’t perform that action at this time.
0 commit comments