File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change 2
2
// you can test this with:
3
3
// cargo run --example puffin --features puffin
4
4
5
-
6
5
use eframe:: NativeOptions ;
7
6
use puffin_egui:: puffin;
8
7
@@ -41,11 +40,11 @@ impl eframe::App for MyApp {
41
40
log:: warn!( "Warn about something" )
42
41
}
43
42
if ui. button ( "This produces 1000 Warnings" ) . clicked ( ) {
44
- ( 1 ..1000 ) . for_each ( |x| log:: warn!( "Warn: {}" , x) ) ;
43
+ ( 1 ..1000 ) . for_each ( |x| log:: warn!( "Warn: {}" , x) ) ;
45
44
log:: warn!( "Warn about something" )
46
45
}
47
46
if ui. button ( "This produces 100_000 Warnings" ) . clicked ( ) {
48
- ( 1 ..100_000 ) . for_each ( |x| log:: warn!( "Warn: {}" , x) ) ;
47
+ ( 1 ..100_000 ) . for_each ( |x| log:: warn!( "Warn: {}" , x) ) ;
49
48
log:: warn!( "Warn about something" )
50
49
}
51
50
} ) ;
Original file line number Diff line number Diff line change @@ -94,8 +94,6 @@ impl log::Log for EguiLogger {
94
94
}
95
95
96
96
fn log ( & self , record : & log:: Record ) {
97
- #[ cfg( feature = "puffin" ) ]
98
- puffin:: profile_scope!( "Lock Mutex" ) ;
99
97
if self . enabled ( record. metadata ( ) ) {
100
98
if let Ok ( ref mut logger) = LOGGER . lock ( ) {
101
99
logger. logs . push ( Record {
You can’t perform that action at this time.
0 commit comments