File tree 5 files changed +8
-6
lines changed
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;
4
4
5
5
fn main ( ) {
6
6
let layer = HierarchicalLayer :: default ( )
7
+ . with_writer ( std:: io:: stdout)
7
8
. with_indent_lines ( true )
8
9
. with_indent_amount ( 2 )
9
10
. with_thread_names ( true )
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ use tracing_tree::HierarchicalLayer;
4
4
5
5
fn main ( ) {
6
6
let layer = HierarchicalLayer :: default ( )
7
+ . with_writer ( std:: io:: stdout)
7
8
. with_indent_lines ( true )
8
9
. with_indent_amount ( 2 )
9
10
. with_thread_names ( true )
Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ fn main() {
29
29
let layer = HierarchicalLayer :: default ( )
30
30
. with_indent_lines ( true )
31
31
. with_indent_amount ( 2 )
32
- . with_bracketed_fields ( true )
33
- . with_writer ( std:: io:: stderr) ;
32
+ . with_bracketed_fields ( true ) ;
34
33
35
34
let subscriber = Registry :: default ( ) . with ( layer) ;
36
35
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;
4
4
5
5
fn main ( ) {
6
6
let layer = HierarchicalLayer :: default ( )
7
+ . with_writer ( std:: io:: stdout)
7
8
. with_indent_lines ( true )
8
9
. with_indent_amount ( 2 )
9
10
. with_thread_names ( true )
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ impl Visit for Data {
44
44
}
45
45
46
46
#[ derive( Debug ) ]
47
- pub struct HierarchicalLayer < W = fn ( ) -> io:: Stdout >
47
+ pub struct HierarchicalLayer < W = fn ( ) -> io:: Stderr >
48
48
where
49
49
W : for < ' writer > MakeWriter < ' writer > + ' static ,
50
50
{
@@ -59,16 +59,16 @@ impl Default for HierarchicalLayer {
59
59
}
60
60
}
61
61
62
- impl HierarchicalLayer < fn ( ) -> io:: Stdout > {
62
+ impl HierarchicalLayer < fn ( ) -> io:: Stderr > {
63
63
pub fn new ( indent_amount : usize ) -> Self {
64
- let ansi = atty:: is ( atty:: Stream :: Stdout ) ;
64
+ let ansi = atty:: is ( atty:: Stream :: Stderr ) ;
65
65
let config = Config {
66
66
ansi,
67
67
indent_amount,
68
68
..Default :: default ( )
69
69
} ;
70
70
Self {
71
- make_writer : io:: stdout ,
71
+ make_writer : io:: stderr ,
72
72
bufs : Mutex :: new ( Buffers :: new ( ) ) ,
73
73
config,
74
74
}
You can’t perform that action at this time.
0 commit comments