@codingame/monaco-vscode-log-service-override 23.3.0 → 24.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -5
- package/vscode/src/vs/platform/log/common/fileLog.js +1 -1
- package/vscode/src/vs/workbench/contrib/logs/common/defaultLogLevels.js +1 -1
- package/vscode/src/vs/workbench/contrib/logs/common/logs.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/logs/common/logsActions.js +12 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-log-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - log service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
20
|
-
"@codingame/monaco-vscode-cea4d01f-6526-5c2f-8b09-b168fead499f-common": "23.3.0",
|
|
21
|
-
"@codingame/monaco-vscode-environment-service-override": "23.3.0"
|
|
18
|
+
"@codingame/monaco-vscode-api": "24.1.1",
|
|
19
|
+
"@codingame/monaco-vscode-environment-service-override": "24.1.1"
|
|
22
20
|
},
|
|
23
21
|
"main": "index.js",
|
|
24
22
|
"module": "index.js",
|
|
@@ -5,7 +5,7 @@ import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buf
|
|
|
5
5
|
import { joinPath, dirname, basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
6
6
|
import { ByteSize, FileOperationResult, whenProviderRegistered } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
7
7
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
8
|
-
import { BufferLogger } from '@codingame/monaco-vscode-
|
|
8
|
+
import { BufferLogger } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/bufferLog';
|
|
9
9
|
import { AbstractMessageLogger, LogLevel, AbstractLoggerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log';
|
|
10
10
|
|
|
11
11
|
const MAX_FILE_SIZE = 5 * ByteSize.MB;
|
|
@@ -7,7 +7,7 @@ import { toFileOperationResult, FileOperationResult } from '@codingame/monaco-vs
|
|
|
7
7
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
8
8
|
import { IJSONEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/configuration/common/jsonEditing.service';
|
|
9
9
|
import { isUndefined, isString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
10
|
-
import { EXTENSION_IDENTIFIER_WITH_LOG_REGEX } from '@codingame/monaco-vscode-
|
|
10
|
+
import { EXTENSION_IDENTIFIER_WITH_LOG_REGEX } from '@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environmentService';
|
|
11
11
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
12
12
|
import { parse } from '@codingame/monaco-vscode-api/vscode/vs/base/common/json';
|
|
13
13
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
@@ -40,7 +40,7 @@ registerAction2(class extends Action2 {
|
|
|
40
40
|
constructor() {
|
|
41
41
|
super({
|
|
42
42
|
id: 'workbench.action.setDefaultLogLevel',
|
|
43
|
-
title: ( localize2(
|
|
43
|
+
title: ( localize2(8561, "Set Default Log Level")),
|
|
44
44
|
category: Categories.Developer,
|
|
45
45
|
});
|
|
46
46
|
}
|
|
@@ -142,7 +142,7 @@ let LogOutputChannels = class LogOutputChannels extends Disposable {
|
|
|
142
142
|
}
|
|
143
143
|
const hasToAppendRemote = existingChannel && logger.resource.scheme === Schemas.vscodeRemote;
|
|
144
144
|
const id = hasToAppendRemote ? `${logger.id}.remote` : logger.id;
|
|
145
|
-
const label = hasToAppendRemote ? ( localize(
|
|
145
|
+
const label = hasToAppendRemote ? ( localize(8562, "{0} (Remote)", logger.name ?? logger.id)) : logger.name ?? logger.id;
|
|
146
146
|
this.outputChannelRegistry.registerChannel({ id, label, source: { resource: logger.resource }, log: true, extensionId: logger.extensionId });
|
|
147
147
|
}
|
|
148
148
|
registerCompoundLogChannel(id, name, logger) {
|
|
@@ -175,7 +175,7 @@ let LogOutputChannels = class LogOutputChannels extends Disposable {
|
|
|
175
175
|
constructor() {
|
|
176
176
|
super({
|
|
177
177
|
id: showWindowLogActionId,
|
|
178
|
-
title: ( localize2(
|
|
178
|
+
title: ( localize2(8563, "Show Window Log")),
|
|
179
179
|
category: Categories.Developer,
|
|
180
180
|
f1: true
|
|
181
181
|
});
|
|
@@ -17,7 +17,7 @@ import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/com
|
|
|
17
17
|
|
|
18
18
|
let SetLogLevelAction = class SetLogLevelAction extends Action {
|
|
19
19
|
static { this.ID = 'workbench.action.setLogLevel'; }
|
|
20
|
-
static { this.TITLE = ( localize2(
|
|
20
|
+
static { this.TITLE = ( localize2(8564, "Set Log Level...")); }
|
|
21
21
|
constructor(id, label, quickInputService, loggerService, outputService, defaultLogLevelsService) {
|
|
22
22
|
super(id, label);
|
|
23
23
|
this.quickInputService = quickInputService;
|
|
@@ -63,18 +63,18 @@ let SetLogLevelAction = class SetLogLevelAction extends Action {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
const entries = [];
|
|
66
|
-
entries.push({ type: 'separator', label: ( localize(
|
|
66
|
+
entries.push({ type: 'separator', label: ( localize(8565, "All")) });
|
|
67
67
|
entries.push(...this.getLogLevelEntries(defaultLogLevels.default, this.loggerService.getLogLevel(), true));
|
|
68
68
|
if (extensionLogs.length) {
|
|
69
|
-
entries.push({ type: 'separator', label: ( localize(
|
|
69
|
+
entries.push({ type: 'separator', label: ( localize(8566, "Extension Logs")) });
|
|
70
70
|
entries.push(...extensionLogs.sort((a, b) => a.label.localeCompare(b.label)));
|
|
71
71
|
}
|
|
72
|
-
entries.push({ type: 'separator', label: ( localize(
|
|
72
|
+
entries.push({ type: 'separator', label: ( localize(8567, "Logs")) });
|
|
73
73
|
entries.push(...logs.sort((a, b) => a.label.localeCompare(b.label)));
|
|
74
74
|
return (new Promise((resolve, reject) => {
|
|
75
75
|
const disposables = ( new DisposableStore());
|
|
76
76
|
const quickPick = disposables.add(this.quickInputService.createQuickPick({ useSeparators: true }));
|
|
77
|
-
quickPick.placeholder = ( localize(
|
|
77
|
+
quickPick.placeholder = ( localize(8568, "Set Log Level"));
|
|
78
78
|
quickPick.items = entries;
|
|
79
79
|
let selectedItem;
|
|
80
80
|
disposables.add(quickPick.onDidTriggerItemButton(e => {
|
|
@@ -100,7 +100,7 @@ let SetLogLevelAction = class SetLogLevelAction extends Action {
|
|
|
100
100
|
return (new Promise((resolve, reject) => {
|
|
101
101
|
const disposables = ( new DisposableStore());
|
|
102
102
|
const quickPick = disposables.add(this.quickInputService.createQuickPick());
|
|
103
|
-
quickPick.placeholder = logChannel ? ( localize(
|
|
103
|
+
quickPick.placeholder = logChannel ? ( localize(8569, " {0}: Select log level", logChannel?.label)) : ( localize(8570, "Select log level"));
|
|
104
104
|
quickPick.items = entries;
|
|
105
105
|
quickPick.activeItems = entries.filter((entry) => entry.level === this.loggerService.getLogLevel());
|
|
106
106
|
let selectedItem;
|
|
@@ -123,7 +123,7 @@ let SetLogLevelAction = class SetLogLevelAction extends Action {
|
|
|
123
123
|
}));
|
|
124
124
|
}
|
|
125
125
|
getLogLevelEntries(defaultLogLevel, currentLogLevel, canSetDefaultLogLevel) {
|
|
126
|
-
const button = canSetDefaultLogLevel ? { iconClass: ThemeIcon.asClassName(Codicon.checkAll), tooltip: ( localize(
|
|
126
|
+
const button = canSetDefaultLogLevel ? { iconClass: ThemeIcon.asClassName(Codicon.checkAll), tooltip: ( localize(8571, "Set as Default Log Level")) } : undefined;
|
|
127
127
|
return [
|
|
128
128
|
{ label: this.getLabel(LogLevel.Trace, currentLogLevel), level: LogLevel.Trace, description: this.getDescription(LogLevel.Trace, defaultLogLevel), buttons: button && defaultLogLevel !== LogLevel.Trace ? [button] : undefined },
|
|
129
129
|
{ label: this.getLabel(LogLevel.Debug, currentLogLevel), level: LogLevel.Debug, description: this.getDescription(LogLevel.Debug, defaultLogLevel), buttons: button && defaultLogLevel !== LogLevel.Debug ? [button] : undefined },
|
|
@@ -138,7 +138,7 @@ let SetLogLevelAction = class SetLogLevelAction extends Action {
|
|
|
138
138
|
return level === current ? `$(check) ${label}` : label;
|
|
139
139
|
}
|
|
140
140
|
getDescription(level, defaultLogLevel) {
|
|
141
|
-
return defaultLogLevel === level ? ( localize(
|
|
141
|
+
return defaultLogLevel === level ? ( localize(8572, "Default")) : undefined;
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
144
|
SetLogLevelAction = ( __decorate([
|
|
@@ -149,7 +149,7 @@ SetLogLevelAction = ( __decorate([
|
|
|
149
149
|
], SetLogLevelAction));
|
|
150
150
|
(class OpenWindowSessionLogFileAction extends Action {
|
|
151
151
|
static { this.ID = 'workbench.action.openSessionLogFile'; }
|
|
152
|
-
static { this.TITLE = ( localize2(
|
|
152
|
+
static { this.TITLE = ( localize2(8573, "Open Window Log File (Session)...")); }
|
|
153
153
|
constructor(id, label, environmentService, fileService, quickInputService, editorService) {
|
|
154
154
|
super(id, label);
|
|
155
155
|
this.environmentService = environmentService;
|
|
@@ -161,10 +161,10 @@ SetLogLevelAction = ( __decorate([
|
|
|
161
161
|
const sessionResult = await this.quickInputService.pick(this.getSessions().then(sessions => ( sessions.map((s, index) => ({
|
|
162
162
|
id: ( s.toString()),
|
|
163
163
|
label: basename(s),
|
|
164
|
-
description: index === 0 ? ( localize(
|
|
164
|
+
description: index === 0 ? ( localize(8574, "Current")) : undefined
|
|
165
165
|
})))), {
|
|
166
166
|
canPickMany: false,
|
|
167
|
-
placeHolder: ( localize(
|
|
167
|
+
placeHolder: ( localize(8575, "Select Session"))
|
|
168
168
|
});
|
|
169
169
|
if (sessionResult) {
|
|
170
170
|
const logFileResult = await this.quickInputService.pick(this.getLogFiles(( URI.parse(sessionResult.id))).then(logFiles => ( logFiles.map((s) => ({
|
|
@@ -172,7 +172,7 @@ SetLogLevelAction = ( __decorate([
|
|
|
172
172
|
label: basename(s)
|
|
173
173
|
})))), {
|
|
174
174
|
canPickMany: false,
|
|
175
|
-
placeHolder: ( localize(
|
|
175
|
+
placeHolder: ( localize(8576, "Select Log file"))
|
|
176
176
|
});
|
|
177
177
|
if (logFileResult) {
|
|
178
178
|
return this.editorService.openEditor({ resource: ( URI.parse(logFileResult.id)), options: { pinned: true } }).then(() => undefined);
|