Skip to content

Commit e2b2ab6

Browse files
committed
(maint) Improve extension logging
This commit changes the configuration in package.json to show the logging levels are an enum, not free text, and adds timestamps to the log messages.
1 parent 070f5fc commit e2b2ab6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

client/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@
255255
"puppet.languageclient.minimumUserLogLevel": {
256256
"type": "string",
257257
"default": "normal",
258-
"description": "Set the minimum log level that the user will see on the Puppet OutputChannel (Allowed values: verbose, debug, normal, warning, error)"
258+
"description": "Set the minimum log level that the user will see on the Puppet connection logs",
259+
"enum": ["verbose", "debug", "normal", "warning", "error" ]
259260
},
260261
"puppet.puppetAgentDir": {
261262
"type": "string",

client/src/logging.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class Logger {
5757
}
5858

5959
private logWithLevel(level: LogLevel, message) {
60-
let logMessage = this.logLevelPrefixAsString(level) + message
60+
let logMessage = this.logLevelPrefixAsString(level) + (new Date().toISOString()) + ' ' + message
6161

6262
console.log(logMessage);
6363
if (level >= this.minimumUserLogLevel) {

0 commit comments

Comments
 (0)