@@ -7,9 +7,9 @@ import TelemetryTransport from "./telemetry-transport";
7
7
import UserNotificationTransport from "./user-notification-transport" ;
8
8
9
9
export enum LogLevel {
10
- info = "info" ,
11
- warn = "warn" ,
12
- error = "error" ,
10
+ Info = "info" ,
11
+ Warn = "warn" ,
12
+ Error = "error" ,
13
13
}
14
14
15
15
function FilterErrorPath ( line : string ) : string {
@@ -27,9 +27,9 @@ function FilterErrorPath(line: string): string {
27
27
export function configure ( context : vscode . ExtensionContext ) {
28
28
winston . configure ( {
29
29
transports : [
30
- new ( winston . transports . File ) ( { level : LogLevel . warn , filename : context . asAbsolutePath ( "arduino.log" ) } ) ,
31
- new TelemetryTransport ( { level : LogLevel . info , context } ) ,
32
- new UserNotificationTransport ( { level : LogLevel . info } ) ,
30
+ new ( winston . transports . File ) ( { level : LogLevel . Warn , filename : context . asAbsolutePath ( "arduino.log" ) } ) ,
31
+ new TelemetryTransport ( { level : LogLevel . Info , context } ) ,
32
+ new UserNotificationTransport ( { level : LogLevel . Info } ) ,
33
33
] ,
34
34
} ) ;
35
35
}
@@ -60,7 +60,7 @@ export function silly(message: string, metadata?: any) {
60
60
61
61
export function traceUserData ( message : string , metadata ?: any ) {
62
62
// use `info` as the log level and add a special flag in metadata
63
- winston . log ( LogLevel . info , message , { ...metadata , telemetry : true } ) ;
63
+ winston . log ( LogLevel . Info , message , { ...metadata , telemetry : true } ) ;
64
64
}
65
65
66
66
function traceErrorOrWarning ( level : string , message : string , error : Error , metadata ?: any ) {
@@ -78,11 +78,11 @@ function traceErrorOrWarning(level: string, message: string, error: Error, metad
78
78
}
79
79
80
80
export function traceError ( message : string , error : Error , metadata ?: any ) {
81
- traceErrorOrWarning ( LogLevel . error , message , error , metadata ) ;
81
+ traceErrorOrWarning ( LogLevel . Error , message , error , metadata ) ;
82
82
}
83
83
84
84
export function traceWarning ( message : string , error : Error , metadata ?: any ) {
85
- traceErrorOrWarning ( LogLevel . warn , message , error , metadata ) ;
85
+ traceErrorOrWarning ( LogLevel . Warn , message , error , metadata ) ;
86
86
}
87
87
88
88
export function notifyAndThrowUserError ( errorCode : string , error : Error , message ?: string ) {
0 commit comments