@codingame/monaco-vscode-log-service-override 1.85.6 → 2.0.0-v2.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/index.js +1 -1
- package/log.js +8 -8
- package/package.json +5 -5
- package/vscode/src/vs/platform/log/common/fileLog.js +5 -5
- package/vscode/src/vs/workbench/contrib/logs/common/defaultLogLevels.js +1 -1
- package/vscode/src/vs/workbench/contrib/logs/common/logs.contribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/logs/common/logsActions.js +28 -28
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default, registerAdditionalLogger } from './log.js';
|
|
2
|
-
export { ConsoleLogger } from '
|
|
2
|
+
export { ConsoleLogger } from 'vscode/vscode/vs/platform/log/common/log';
|
package/log.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { __decorate, __param } from './external/tslib/tslib.es6.js';
|
|
2
|
-
import { SyncDescriptor } from '
|
|
3
|
-
import { IFileService } from '
|
|
4
|
-
import { ILoggerService, ILogService, getLogLevel } from '
|
|
5
|
-
export { ConsoleLogger } from '
|
|
2
|
+
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
3
|
+
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files';
|
|
4
|
+
import { ILoggerService, ILogService, getLogLevel } from 'vscode/vscode/vs/platform/log/common/log';
|
|
5
|
+
export { ConsoleLogger } from 'vscode/vscode/vs/platform/log/common/log';
|
|
6
6
|
import { FileLoggerService } from './vscode/src/vs/platform/log/common/fileLog.js';
|
|
7
|
-
import { LogService } from '
|
|
8
|
-
import { IEnvironmentService } from '
|
|
9
|
-
import { localizeWithPath } from '
|
|
7
|
+
import { LogService } from 'vscode/vscode/vs/platform/log/common/logService';
|
|
8
|
+
import { IEnvironmentService } from 'vscode/vscode/vs/platform/environment/common/environment';
|
|
9
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
10
10
|
import { windowLogId } from 'vscode/vscode/vs/workbench/services/log/common/logConstants';
|
|
11
11
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
|
|
12
|
-
import { toDisposable } from '
|
|
12
|
+
import { toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
13
13
|
import getServiceOverride$1 from '@codingame/monaco-vscode-environment-service-override';
|
|
14
14
|
import { logsPath } from 'vscode/workbench';
|
|
15
15
|
import './vscode/src/vs/workbench/contrib/logs/common/logs.contribution.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-log-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-v2.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "git
|
|
12
|
+
"url": "git@github.com:CodinGame/monaco-vscode-api.git"
|
|
13
13
|
},
|
|
14
14
|
"type": "module",
|
|
15
15
|
"private": false,
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
22
|
-
"
|
|
23
|
-
"@codingame/monaco-vscode-environment-service-override": "
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@2.0.0-v2.1",
|
|
22
|
+
"vscode-marked": "npm:marked@=3.0.2",
|
|
23
|
+
"@codingame/monaco-vscode-environment-service-override": "2.0.0-v2.1"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { ThrottledDelayer } from '
|
|
3
|
-
import { VSBuffer } from '
|
|
4
|
-
import { joinPath, dirname, basename } from '
|
|
5
|
-
import { ByteSize, IFileService, whenProviderRegistered } from '
|
|
2
|
+
import { ThrottledDelayer } from 'vscode/vscode/vs/base/common/async';
|
|
3
|
+
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
4
|
+
import { joinPath, dirname, basename } from 'vscode/vscode/vs/base/common/resources';
|
|
5
|
+
import { ByteSize, IFileService, whenProviderRegistered } from 'vscode/vscode/vs/platform/files/common/files';
|
|
6
6
|
import { BufferLogger } from 'vscode/vscode/vs/platform/log/common/bufferLog';
|
|
7
|
-
import { AbstractMessageLogger, LogLevel, AbstractLoggerService } from '
|
|
7
|
+
import { AbstractMessageLogger, LogLevel, AbstractLoggerService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
8
8
|
|
|
9
9
|
const MAX_FILE_SIZE = 5 * ByteSize.MB;
|
|
10
10
|
let FileLogger = class FileLogger extends AbstractMessageLogger {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createDecorator } from '
|
|
1
|
+
import { createDecorator } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
2
2
|
|
|
3
3
|
const IDefaultLogLevelsService = ( createDecorator('IDefaultLogLevelsService'));
|
|
4
4
|
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import
|
|
3
|
-
import { Registry } from '
|
|
4
|
-
import { Categories } from '
|
|
5
|
-
import { registerAction2, Action2 } from '
|
|
2
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
|
+
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
4
|
+
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
5
|
+
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
6
6
|
import { SetLogLevelAction } from './logsActions.js';
|
|
7
7
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
8
|
-
import { whenProviderRegistered, IFileService } from '
|
|
8
|
+
import { whenProviderRegistered, IFileService } from 'vscode/vscode/vs/platform/files/common/files';
|
|
9
9
|
import { Extensions as Extensions$1, IOutputService } from 'vscode/vscode/vs/workbench/services/output/common/output';
|
|
10
|
-
import { Disposable, DisposableMap, DisposableStore, toDisposable } from '
|
|
11
|
-
import { CONTEXT_LOG_LEVEL, LogLevelToString, isLogLevel, ILogService, ILoggerService } from '
|
|
12
|
-
import { IInstantiationService } from '
|
|
13
|
-
import { Event } from '
|
|
10
|
+
import { Disposable, DisposableMap, DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
11
|
+
import { CONTEXT_LOG_LEVEL, LogLevelToString, isLogLevel, ILogService, ILoggerService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
12
|
+
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
13
|
+
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
14
14
|
import { showWindowLogActionId, windowLogId } from 'vscode/vscode/vs/workbench/services/log/common/logConstants';
|
|
15
|
-
import { createCancelablePromise, timeout } from '
|
|
16
|
-
import { isCancellationError, getErrorMessage, CancellationError } from '
|
|
15
|
+
import { createCancelablePromise, timeout } from 'vscode/vscode/vs/base/common/async';
|
|
16
|
+
import { isCancellationError, getErrorMessage, CancellationError } from 'vscode/vscode/vs/base/common/errors';
|
|
17
17
|
import { IDefaultLogLevelsService } from './defaultLogLevels.js';
|
|
18
|
-
import { ContextKeyExpr, IContextKeyService } from '
|
|
19
|
-
import { CounterSet } from '
|
|
20
|
-
import { IUriIdentityService } from '
|
|
21
|
-
import { Schemas } from '
|
|
18
|
+
import { ContextKeyExpr, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
19
|
+
import { CounterSet } from 'vscode/vscode/vs/base/common/map';
|
|
20
|
+
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity';
|
|
21
|
+
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
22
22
|
|
|
23
23
|
registerAction2(class extends Action2 {
|
|
24
24
|
constructor() {
|
|
@@ -37,7 +37,7 @@ registerAction2(class extends Action2 {
|
|
|
37
37
|
constructor() {
|
|
38
38
|
super({
|
|
39
39
|
id: 'workbench.action.setDefaultLogLevel',
|
|
40
|
-
title: { value: (
|
|
40
|
+
title: { value: ( localizeWithPath(
|
|
41
41
|
'vs/workbench/contrib/logs/common/logs.contribution',
|
|
42
42
|
'setDefaultLogLevel',
|
|
43
43
|
"Set Default Log Level"
|
|
@@ -147,7 +147,7 @@ let LogOutputChannels = class LogOutputChannels extends Disposable {
|
|
|
147
147
|
}
|
|
148
148
|
const hasToAppendRemote = existingChannel && logger.resource.scheme === Schemas.vscodeRemote;
|
|
149
149
|
const id = hasToAppendRemote ? `${logger.id}.remote` : logger.id;
|
|
150
|
-
const label = hasToAppendRemote ? (
|
|
150
|
+
const label = hasToAppendRemote ? ( localizeWithPath(
|
|
151
151
|
'vs/workbench/contrib/logs/common/logs.contribution',
|
|
152
152
|
'remote name',
|
|
153
153
|
"{0} (Remote)",
|
|
@@ -191,7 +191,7 @@ let LogOutputChannels = class LogOutputChannels extends Disposable {
|
|
|
191
191
|
constructor() {
|
|
192
192
|
super({
|
|
193
193
|
id: showWindowLogActionId,
|
|
194
|
-
title: { value: (
|
|
194
|
+
title: { value: ( localizeWithPath(
|
|
195
195
|
'vs/workbench/contrib/logs/common/logs.contribution',
|
|
196
196
|
'show window log',
|
|
197
197
|
"Show Window Log"
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import
|
|
3
|
-
import { Action } from '
|
|
4
|
-
import { isLogLevel, LogLevel, ILoggerService } from '
|
|
5
|
-
import { IQuickInputService } from '
|
|
6
|
-
import { URI } from '
|
|
7
|
-
import { basename, dirname, isEqual } from '
|
|
2
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
|
+
import { Action } from 'vscode/vscode/vs/base/common/actions';
|
|
4
|
+
import { isLogLevel, LogLevel, ILoggerService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
5
|
+
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput';
|
|
6
|
+
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
7
|
+
import { basename, dirname, isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
8
8
|
import { IOutputService } from 'vscode/vscode/vs/workbench/services/output/common/output';
|
|
9
9
|
import { telemetryLogId, extensionTelemetryLogChannelId } from 'vscode/vscode/vs/platform/telemetry/common/telemetryUtils';
|
|
10
10
|
import { IDefaultLogLevelsService } from './defaultLogLevels.js';
|
|
11
|
-
import { Codicon } from '
|
|
12
|
-
import { ThemeIcon } from '
|
|
13
|
-
import { DisposableStore } from '
|
|
11
|
+
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
12
|
+
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
13
|
+
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
14
14
|
|
|
15
15
|
let SetLogLevelAction = class SetLogLevelAction extends Action {
|
|
16
16
|
static { this.ID = 'workbench.action.setLogLevel'; }
|
|
17
|
-
static { this.TITLE = { value: (
|
|
17
|
+
static { this.TITLE = { value: ( localizeWithPath(
|
|
18
18
|
'vs/workbench/contrib/logs/common/logsActions',
|
|
19
19
|
'setLogLevel',
|
|
20
20
|
"Set Log Level..."
|
|
@@ -55,22 +55,22 @@ let SetLogLevelAction = class SetLogLevelAction extends Action {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
const entries = [];
|
|
58
|
-
entries.push({ type: 'separator', label: (
|
|
58
|
+
entries.push({ type: 'separator', label: ( localizeWithPath('vs/workbench/contrib/logs/common/logsActions', 'all', "All")) });
|
|
59
59
|
entries.push(...this.getLogLevelEntries(defaultLogLevels.default, this.loggerService.getLogLevel(), true));
|
|
60
60
|
if (extensionLogs.length) {
|
|
61
|
-
entries.push({ type: 'separator', label: (
|
|
61
|
+
entries.push({ type: 'separator', label: ( localizeWithPath(
|
|
62
62
|
'vs/workbench/contrib/logs/common/logsActions',
|
|
63
63
|
'extensionLogs',
|
|
64
64
|
"Extension Logs"
|
|
65
65
|
)) });
|
|
66
66
|
entries.push(...extensionLogs.sort((a, b) => a.label.localeCompare(b.label)));
|
|
67
67
|
}
|
|
68
|
-
entries.push({ type: 'separator', label: (
|
|
68
|
+
entries.push({ type: 'separator', label: ( localizeWithPath('vs/workbench/contrib/logs/common/logsActions', 'loggers', "Logs")) });
|
|
69
69
|
entries.push(...logs.sort((a, b) => a.label.localeCompare(b.label)));
|
|
70
70
|
return ( new Promise((resolve, reject) => {
|
|
71
71
|
const disposables = ( new DisposableStore());
|
|
72
72
|
const quickPick = this.quickInputService.createQuickPick();
|
|
73
|
-
quickPick.placeholder = (
|
|
73
|
+
quickPick.placeholder = ( localizeWithPath(
|
|
74
74
|
'vs/workbench/contrib/logs/common/logsActions',
|
|
75
75
|
'selectlog',
|
|
76
76
|
"Set Log Level"
|
|
@@ -101,12 +101,12 @@ let SetLogLevelAction = class SetLogLevelAction extends Action {
|
|
|
101
101
|
return ( new Promise((resolve, reject) => {
|
|
102
102
|
const disposables = ( new DisposableStore());
|
|
103
103
|
const quickPick = this.quickInputService.createQuickPick();
|
|
104
|
-
quickPick.placeholder = logChannel ? (
|
|
104
|
+
quickPick.placeholder = logChannel ? ( localizeWithPath(
|
|
105
105
|
'vs/workbench/contrib/logs/common/logsActions',
|
|
106
106
|
'selectLogLevelFor',
|
|
107
107
|
" {0}: Select log level",
|
|
108
108
|
logChannel?.label
|
|
109
|
-
)) : (
|
|
109
|
+
)) : ( localizeWithPath(
|
|
110
110
|
'vs/workbench/contrib/logs/common/logsActions',
|
|
111
111
|
'selectLogLevel',
|
|
112
112
|
"Select log level"
|
|
@@ -133,7 +133,7 @@ let SetLogLevelAction = class SetLogLevelAction extends Action {
|
|
|
133
133
|
}));
|
|
134
134
|
}
|
|
135
135
|
getLogLevelEntries(defaultLogLevel, currentLogLevel, canSetDefaultLogLevel) {
|
|
136
|
-
const button = canSetDefaultLogLevel ? { iconClass: ThemeIcon.asClassName(Codicon.checkAll), tooltip: (
|
|
136
|
+
const button = canSetDefaultLogLevel ? { iconClass: ThemeIcon.asClassName(Codicon.checkAll), tooltip: ( localizeWithPath(
|
|
137
137
|
'vs/workbench/contrib/logs/common/logsActions',
|
|
138
138
|
'resetLogLevel',
|
|
139
139
|
"Set as Default Log Level"
|
|
@@ -151,28 +151,28 @@ let SetLogLevelAction = class SetLogLevelAction extends Action {
|
|
|
151
151
|
let label;
|
|
152
152
|
switch (level) {
|
|
153
153
|
case LogLevel.Trace:
|
|
154
|
-
label = (
|
|
154
|
+
label = ( localizeWithPath('vs/workbench/contrib/logs/common/logsActions', 'trace', "Trace"));
|
|
155
155
|
break;
|
|
156
156
|
case LogLevel.Debug:
|
|
157
|
-
label = (
|
|
157
|
+
label = ( localizeWithPath('vs/workbench/contrib/logs/common/logsActions', 'debug', "Debug"));
|
|
158
158
|
break;
|
|
159
159
|
case LogLevel.Info:
|
|
160
|
-
label = (
|
|
160
|
+
label = ( localizeWithPath('vs/workbench/contrib/logs/common/logsActions', 'info', "Info"));
|
|
161
161
|
break;
|
|
162
162
|
case LogLevel.Warning:
|
|
163
|
-
label = (
|
|
163
|
+
label = ( localizeWithPath('vs/workbench/contrib/logs/common/logsActions', 'warn', "Warning"));
|
|
164
164
|
break;
|
|
165
165
|
case LogLevel.Error:
|
|
166
|
-
label = (
|
|
166
|
+
label = ( localizeWithPath('vs/workbench/contrib/logs/common/logsActions', 'err', "Error"));
|
|
167
167
|
break;
|
|
168
168
|
case LogLevel.Off:
|
|
169
|
-
label = (
|
|
169
|
+
label = ( localizeWithPath('vs/workbench/contrib/logs/common/logsActions', 'off', "Off"));
|
|
170
170
|
break;
|
|
171
171
|
}
|
|
172
172
|
return level === current ? `$(check) ${label}` : label;
|
|
173
173
|
}
|
|
174
174
|
getDescription(level, defaultLogLevel) {
|
|
175
|
-
return defaultLogLevel === level ? (
|
|
175
|
+
return defaultLogLevel === level ? ( localizeWithPath('vs/workbench/contrib/logs/common/logsActions', 'default', "Default")) : undefined;
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
178
|
SetLogLevelAction = ( __decorate([
|
|
@@ -183,7 +183,7 @@ SetLogLevelAction = ( __decorate([
|
|
|
183
183
|
], SetLogLevelAction));
|
|
184
184
|
(class OpenWindowSessionLogFileAction extends Action {
|
|
185
185
|
static { this.ID = 'workbench.action.openSessionLogFile'; }
|
|
186
|
-
static { this.TITLE = { value: (
|
|
186
|
+
static { this.TITLE = { value: ( localizeWithPath(
|
|
187
187
|
'vs/workbench/contrib/logs/common/logsActions',
|
|
188
188
|
'openSessionLogFile',
|
|
189
189
|
"Open Window Log File (Session)..."
|
|
@@ -199,10 +199,10 @@ SetLogLevelAction = ( __decorate([
|
|
|
199
199
|
const sessionResult = await this.quickInputService.pick(this.getSessions().then(sessions => ( sessions.map((s, index) => ({
|
|
200
200
|
id: ( s.toString()),
|
|
201
201
|
label: basename(s),
|
|
202
|
-
description: index === 0 ? (
|
|
202
|
+
description: index === 0 ? ( localizeWithPath('vs/workbench/contrib/logs/common/logsActions', 'current', "Current")) : undefined
|
|
203
203
|
})))), {
|
|
204
204
|
canPickMany: false,
|
|
205
|
-
placeHolder: (
|
|
205
|
+
placeHolder: ( localizeWithPath(
|
|
206
206
|
'vs/workbench/contrib/logs/common/logsActions',
|
|
207
207
|
'sessions placeholder',
|
|
208
208
|
"Select Session"
|
|
@@ -214,7 +214,7 @@ SetLogLevelAction = ( __decorate([
|
|
|
214
214
|
label: basename(s)
|
|
215
215
|
})))), {
|
|
216
216
|
canPickMany: false,
|
|
217
|
-
placeHolder: (
|
|
217
|
+
placeHolder: ( localizeWithPath(
|
|
218
218
|
'vs/workbench/contrib/logs/common/logsActions',
|
|
219
219
|
'log placeholder',
|
|
220
220
|
"Select Log file"
|