File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ export class DeviceLogProvider extends DeviceLogProviderBase {
4444 this . $logFilter . loggingLevel = logLevel . toUpperCase ( ) ;
4545 }
4646
47- private consoleLogLevelRegex : RegExp = / ^ C O N S O L E ( L O G | I N F O | W A R N | E R R O R | T R A C E | I N F O ( .+ ) ) : \s / ;
47+ private consoleLogLevelRegex : RegExp =
48+ / ^ C O N S O L E ( L O G | I N F O | W A R N | E R R O R | T R A C E | I N F O ( .+ ) | T I M E ) : \s / ;
4849 private consoleLevelColor : Record < string , ( line : string ) => string > = {
4950 log : ( line ) => line ,
5051 info : color . cyanBright ,
@@ -85,6 +86,9 @@ export class DeviceLogProvider extends DeviceLogProviderBase {
8586 }
8687
8788 private logDataCore ( data : string , deviceIdentifier : string ) : void {
89+ // strip android JS: prefix
90+ data = data . replace ( / ^ J S : \s / , "" ) ;
91+
8892 // todo: use config to set logger - --env.classicLogs is temporary!
8993 if ( "classicLogs" in ( this . $options . env ?? { } ) ) {
9094 // legacy logging
@@ -137,6 +141,8 @@ export class DeviceLogProvider extends DeviceLogProviderBase {
137141 if ( timeLabel ) {
138142 level = "time" ;
139143 timeLabel = timeLabel . replace ( "INFO " , "" ) . trim ( ) + ": " ;
144+ } else if ( ! level && line . startsWith ( "Trace:" ) ) {
145+ level = "trace" ;
140146 } else {
141147 level = level ?. toLowerCase ( ) ?? "log" ;
142148 }
You can’t perform that action at this time.
0 commit comments