File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,21 @@ static void Main(string[] args)
99 {
1010 if ( TraceEventSession . IsElevated ( ) != true )
1111 {
12- Console . WriteLine ( "x| To turn on ETW events you need to be Administrator, please run from an Admin process." ) ;
12+ Console . WriteLine ( "[ERROR] To turn on ETW events you need to be Administrator, please run from an Admin process." ) ;
1313 return ;
1414 }
1515
1616 string ? filePath = ( args . Length < 1 ) ? null : args [ 0 ] ;
1717
1818 if ( filePath == "testRun" ) {
19- Console . WriteLine ( "x| testRun" ) ;
19+ Console . WriteLine ( "[BREAK] testRun, exiting " ) ;
2020 return ;
2121 }
2222
23+ Console . CancelKeyPress += delegate {
24+ Console . WriteLine ( "[BREAK] Exiting" ) ;
25+ } ;
26+
2327 using var session = new TraceEventSession ( "FileRead" ) ;
2428
2529 Console . CancelKeyPress += ( sender , e ) => session . Stop ( ) ;
@@ -32,14 +36,15 @@ static void Main(string[] args)
3236 {
3337 if ( filePath == null || string . Compare ( data . FileName , filePath , StringComparison . OrdinalIgnoreCase ) == 0 )
3438 {
35- string line = ">| " ;
39+ string line = "[EVENT] " ;
3640 line += data . Offset + "|" ;
3741 line += data . IoSize + "|" ;
3842 line += data . FileName ;
3943 Console . WriteLine ( line ) ;
4044 }
4145 } ;
4246
47+ Console . WriteLine ( "[READY] Starting process" ) ;
4348 session . Source . Process ( ) ;
4449 }
4550 }
You can’t perform that action at this time.
0 commit comments