File tree Expand file tree Collapse file tree 1 file changed +25
-6
lines changed Expand file tree Collapse file tree 1 file changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -60,16 +60,35 @@ extern crate alloc;
60
60
use getrandom_package as getrandom;
61
61
62
62
#[ allow( unused) ]
63
- #[ cfg( not( feature = "log" ) ) ] macro_rules! trace { ( $( $x: tt) * ) => ( ) }
63
+ macro_rules! trace { ( $( $x: tt) * ) => (
64
+ #[ cfg( feature = "log" ) ] {
65
+ log:: trace!( $( $x) * )
66
+ }
67
+ ) }
64
68
#[ allow( unused) ]
65
- #[ cfg( not( feature = "log" ) ) ] macro_rules! debug { ( $( $x: tt) * ) => ( ) }
69
+ macro_rules! debug { ( $( $x: tt) * ) => (
70
+ #[ cfg( feature = "log" ) ] {
71
+ log:: debug!( $( $x) * )
72
+ }
73
+ ) }
66
74
#[ allow( unused) ]
67
- #[ cfg( not( feature = "log" ) ) ] macro_rules! info { ( $( $x: tt) * ) => ( ) }
75
+ macro_rules! info { ( $( $x: tt) * ) => (
76
+ #[ cfg( feature = "log" ) ] {
77
+ log:: info!( $( $x) * )
78
+ }
79
+ ) }
68
80
#[ allow( unused) ]
69
- #[ cfg( not( feature = "log" ) ) ] macro_rules! warn { ( $( $x: tt) * ) => ( ) }
81
+ macro_rules! warn { ( $( $x: tt) * ) => (
82
+ #[ cfg( feature = "log" ) ] {
83
+ log:: warn!( $( $x) * )
84
+ }
85
+ ) }
70
86
#[ allow( unused) ]
71
- #[ cfg( not( feature = "log" ) ) ] macro_rules! error { ( $( $x: tt) * ) => ( ) }
72
-
87
+ macro_rules! error { ( $( $x: tt) * ) => (
88
+ #[ cfg( feature = "log" ) ] {
89
+ log:: error!( $( $x) * )
90
+ }
91
+ ) }
73
92
74
93
// Re-exports from rand_core
75
94
pub use rand_core:: { RngCore , CryptoRng , SeedableRng , Error } ;
You can’t perform that action at this time.
0 commit comments