File tree Expand file tree Collapse file tree 5 files changed +8
-6
lines changed Expand file tree Collapse file tree 5 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ use tracing_tree::HierarchicalLayer;
44
55fn main ( ) {
66 let layer = HierarchicalLayer :: default ( )
7+ . with_writer ( std:: io:: stdout)
78 . with_indent_lines ( true )
89 . with_indent_amount ( 2 )
910 . with_thread_names ( true )
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ use tracing_tree::HierarchicalLayer;
44
55fn main ( ) {
66 let layer = HierarchicalLayer :: default ( )
7+ . with_writer ( std:: io:: stdout)
78 . with_indent_lines ( true )
89 . with_indent_amount ( 2 )
910 . with_thread_names ( true )
Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ fn main() {
2929 let layer = HierarchicalLayer :: default ( )
3030 . with_indent_lines ( true )
3131 . with_indent_amount ( 2 )
32- . with_bracketed_fields ( true )
33- . with_writer ( std:: io:: stderr) ;
32+ . with_bracketed_fields ( true ) ;
3433
3534 let subscriber = Registry :: default ( ) . with ( layer) ;
3635 tracing:: subscriber:: set_global_default ( subscriber) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ use tracing_tree::HierarchicalLayer;
44
55fn main ( ) {
66 let layer = HierarchicalLayer :: default ( )
7+ . with_writer ( std:: io:: stdout)
78 . with_indent_lines ( true )
89 . with_indent_amount ( 2 )
910 . with_thread_names ( true )
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ impl Visit for Data {
4444}
4545
4646#[ derive( Debug ) ]
47- pub struct HierarchicalLayer < W = fn ( ) -> io:: Stdout >
47+ pub struct HierarchicalLayer < W = fn ( ) -> io:: Stderr >
4848where
4949 W : for < ' writer > MakeWriter < ' writer > + ' static ,
5050{
@@ -59,16 +59,16 @@ impl Default for HierarchicalLayer {
5959 }
6060}
6161
62- impl HierarchicalLayer < fn ( ) -> io:: Stdout > {
62+ impl HierarchicalLayer < fn ( ) -> io:: Stderr > {
6363 pub fn new ( indent_amount : usize ) -> Self {
64- let ansi = atty:: is ( atty:: Stream :: Stdout ) ;
64+ let ansi = atty:: is ( atty:: Stream :: Stderr ) ;
6565 let config = Config {
6666 ansi,
6767 indent_amount,
6868 ..Default :: default ( )
6969 } ;
7070 Self {
71- make_writer : io:: stdout ,
71+ make_writer : io:: stderr ,
7272 bufs : Mutex :: new ( Buffers :: new ( ) ) ,
7373 config,
7474 }
You can’t perform that action at this time.
0 commit comments