Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
90b94baa
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
90b94baa
编写于
11月 29, 2017
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use logservice in shell
上级
672b0b73
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
6 deletion
+15
-6
src/vs/platform/log/node/spdlogService.ts
src/vs/platform/log/node/spdlogService.ts
+6
-6
src/vs/workbench/electron-browser/main.ts
src/vs/workbench/electron-browser/main.ts
+4
-0
src/vs/workbench/electron-browser/shell.ts
src/vs/workbench/electron-browser/shell.ts
+5
-0
未找到文件。
src/vs/platform/log/node/spdlogService.ts
浏览文件 @
90b94baa
...
...
@@ -20,26 +20,26 @@ export class SpdLogService implements ILogService {
}
trace
(
message
:
string
,
...
args
:
any
[]):
void
{
throw
new
Error
(
'
Method not implemented.
'
);
//
throw new Error('Method not implemented.');
}
debug
(
message
:
string
,
...
args
:
any
[]):
void
{
throw
new
Error
(
'
Method not implemented.
'
);
//
throw new Error('Method not implemented.');
}
info
(
message
:
string
,
...
args
:
any
[]):
void
{
throw
new
Error
(
'
Method not implemented.
'
);
//
throw new Error('Method not implemented.');
}
warn
(
message
:
string
,
...
args
:
any
[]):
void
{
throw
new
Error
(
'
Method not implemented.
'
);
//
throw new Error('Method not implemented.');
}
error
(
message
:
string
|
Error
,
...
args
:
any
[]):
void
{
throw
new
Error
(
'
Method not implemented.
'
);
//
throw new Error('Method not implemented.');
}
critical
(
message
:
string
,
...
args
:
any
[]):
void
{
throw
new
Error
(
'
Method not implemented.
'
);
//
throw new Error('Method not implemented.');
}
}
\ No newline at end of file
src/vs/workbench/electron-browser/main.ts
浏览文件 @
90b94baa
...
...
@@ -41,6 +41,7 @@ import { WorkspacesChannelClient } from 'vs/platform/workspaces/common/workspace
import
{
IWorkspacesService
}
from
'
vs/platform/workspaces/common/workspaces
'
;
import
fs
=
require
(
'
fs
'
);
import
{
SpdLogService
}
from
'
vs/platform/log/node/spdlogService
'
;
gracefulFs
.
gracefulify
(
fs
);
// enable gracefulFs
const
currentWindowId
=
remote
.
getCurrentWindow
().
id
;
...
...
@@ -72,6 +73,8 @@ function openWorkbench(configuration: IWindowConfiguration): TPromise<void> {
const
mainServices
=
createMainProcessServices
(
mainProcessClient
);
const
environmentService
=
new
EnvironmentService
(
configuration
,
configuration
.
execPath
);
const
logService
=
new
SpdLogService
(
'
renderer
'
,
environmentService
);
logService
.
info
(
'
openWorkbench
'
,
JSON
.
stringify
(
configuration
,
null
,
2
));
// Since the configuration service is one of the core services that is used in so many places, we initialize it
// right before startup of the workbench shell to have its data ready for consumers
...
...
@@ -90,6 +93,7 @@ function openWorkbench(configuration: IWindowConfiguration): TPromise<void> {
contextService
:
workspaceService
,
configurationService
:
workspaceService
,
environmentService
,
logService
,
timerService
,
storageService
},
mainServices
,
configuration
);
...
...
src/vs/workbench/electron-browser/shell.ts
浏览文件 @
90b94baa
...
...
@@ -88,6 +88,7 @@ import { ITextMateService } from 'vs/workbench/services/textMate/electron-browse
import
{
IBroadcastService
,
BroadcastService
}
from
'
vs/platform/broadcast/electron-browser/broadcastService
'
;
import
{
HashService
}
from
'
vs/workbench/services/hash/node/hashService
'
;
import
{
IHashService
}
from
'
vs/workbench/services/hash/common/hashService
'
;
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
/**
* Services that we require for the Shell
...
...
@@ -96,6 +97,7 @@ export interface ICoreServices {
contextService
:
IWorkspaceContextService
;
configurationService
:
IConfigurationService
;
environmentService
:
IEnvironmentService
;
logService
:
ILogService
;
timerService
:
ITimerService
;
storageService
:
IStorageService
;
}
...
...
@@ -110,6 +112,7 @@ export class WorkbenchShell {
private
storageService
:
IStorageService
;
private
messageService
:
MessageService
;
private
environmentService
:
IEnvironmentService
;
private
logService
:
ILogService
;
private
contextViewService
:
ContextViewService
;
private
configurationService
:
IConfigurationService
;
private
contextService
:
IWorkspaceContextService
;
...
...
@@ -140,6 +143,7 @@ export class WorkbenchShell {
this
.
contextService
=
coreServices
.
contextService
;
this
.
configurationService
=
coreServices
.
configurationService
;
this
.
environmentService
=
coreServices
.
environmentService
;
this
.
logService
=
coreServices
.
logService
;
this
.
timerService
=
coreServices
.
timerService
;
this
.
storageService
=
coreServices
.
storageService
;
...
...
@@ -279,6 +283,7 @@ export class WorkbenchShell {
serviceCollection
.
set
(
IWorkspaceContextService
,
this
.
contextService
);
serviceCollection
.
set
(
IConfigurationService
,
this
.
configurationService
);
serviceCollection
.
set
(
IEnvironmentService
,
this
.
environmentService
);
serviceCollection
.
set
(
ILogService
,
this
.
logService
);
serviceCollection
.
set
(
ITimerService
,
this
.
timerService
);
serviceCollection
.
set
(
IStorageService
,
this
.
storageService
);
this
.
mainProcessServices
.
forEach
((
serviceIdentifier
,
serviceInstance
)
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录