Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
10884cc3
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
10884cc3
编写于
10月 08, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
web - better resolve log level
上级
9c05b47e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
24 deletion
+10
-24
src/vs/code/browser/workbench/workbench.ts
src/vs/code/browser/workbench/workbench.ts
+4
-17
src/vs/workbench/browser/web.main.ts
src/vs/workbench/browser/web.main.ts
+6
-6
src/vs/workbench/workbench.web.api.ts
src/vs/workbench/workbench.web.api.ts
+0
-1
未找到文件。
src/vs/code/browser/workbench/workbench.ts
浏览文件 @
10884cc3
...
@@ -17,7 +17,6 @@ import { isStandalone } from 'vs/base/browser/browser';
...
@@ -17,7 +17,6 @@ import { isStandalone } from 'vs/base/browser/browser';
import
{
localize
}
from
'
vs/nls
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
product
from
'
vs/platform/product/common/product
'
;
import
product
from
'
vs/platform/product/common/product
'
;
import
{
getLogLevel
,
LogLevel
}
from
'
vs/platform/log/common/log
'
;
function
doCreateUri
(
path
:
string
,
queryValues
:
Map
<
string
,
string
>
):
URI
{
function
doCreateUri
(
path
:
string
,
queryValues
:
Map
<
string
,
string
>
):
URI
{
let
query
:
string
|
undefined
=
undefined
;
let
query
:
string
|
undefined
=
undefined
;
...
@@ -417,8 +416,7 @@ class WindowIndicator implements IWindowIndicator {
...
@@ -417,8 +416,7 @@ class WindowIndicator implements IWindowIndicator {
// Find workspace to open and payload
// Find workspace to open and payload
let
foundWorkspace
=
false
;
let
foundWorkspace
=
false
;
let
workspace
:
IWorkspace
;
let
workspace
:
IWorkspace
;
let
payloadRaw
=
Object
.
create
(
null
);
let
payload
=
Object
.
create
(
null
);
let
payloadMap
=
new
Map
<
string
,
string
>
();
const
query
=
new
URL
(
document
.
location
.
href
).
searchParams
;
const
query
=
new
URL
(
document
.
location
.
href
).
searchParams
;
query
.
forEach
((
value
,
key
)
=>
{
query
.
forEach
((
value
,
key
)
=>
{
...
@@ -445,10 +443,7 @@ class WindowIndicator implements IWindowIndicator {
...
@@ -445,10 +443,7 @@ class WindowIndicator implements IWindowIndicator {
// Payload
// Payload
case
WorkspaceProvider
.
QUERY_PARAM_PAYLOAD
:
case
WorkspaceProvider
.
QUERY_PARAM_PAYLOAD
:
try
{
try
{
payloadRaw
=
JSON
.
parse
(
value
);
payload
=
JSON
.
parse
(
value
);
if
(
Array
.
isArray
(
payloadRaw
))
{
payloadMap
=
new
Map
(
payloadRaw
);
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
);
// possible invalid JSON
console
.
error
(
error
);
// possible invalid JSON
}
}
...
@@ -468,7 +463,7 @@ class WindowIndicator implements IWindowIndicator {
...
@@ -468,7 +463,7 @@ class WindowIndicator implements IWindowIndicator {
}
}
// Workspace Provider
// Workspace Provider
const
workspaceProvider
=
new
WorkspaceProvider
(
workspace
,
payload
Raw
);
const
workspaceProvider
=
new
WorkspaceProvider
(
workspace
,
payload
);
// Home Indicator
// Home Indicator
const
homeIndicator
:
IHomeIndicator
=
{
const
homeIndicator
:
IHomeIndicator
=
{
...
@@ -516,13 +511,6 @@ class WindowIndicator implements IWindowIndicator {
...
@@ -516,13 +511,6 @@ class WindowIndicator implements IWindowIndicator {
}
}
}
:
undefined
;
}
:
undefined
;
// log level
let
logLevel
:
LogLevel
|
undefined
=
undefined
;
const
logLevelPayload
=
payloadMap
.
get
(
'
logLevel
'
);
if
(
logLevelPayload
)
{
logLevel
=
getLogLevel
(
logLevelPayload
);
}
// Finally create workbench
// Finally create workbench
create
(
document
.
body
,
{
create
(
document
.
body
,
{
...
config
,
...
config
,
...
@@ -532,7 +520,6 @@ class WindowIndicator implements IWindowIndicator {
...
@@ -532,7 +520,6 @@ class WindowIndicator implements IWindowIndicator {
productQualityChangeHandler
,
productQualityChangeHandler
,
workspaceProvider
,
workspaceProvider
,
urlCallbackProvider
:
new
PollingURLCallbackProvider
(),
urlCallbackProvider
:
new
PollingURLCallbackProvider
(),
credentialsProvider
:
new
LocalStorageCredentialsProvider
(),
credentialsProvider
:
new
LocalStorageCredentialsProvider
()
logLevel
});
});
})();
})();
src/vs/workbench/browser/web.main.ts
浏览文件 @
10884cc3
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
import
{
mark
}
from
'
vs/base/common/performance
'
;
import
{
mark
}
from
'
vs/base/common/performance
'
;
import
{
domContentLoaded
,
addDisposableListener
,
EventType
,
EventHelper
,
detectFullscreen
,
addDisposableThrottledListener
}
from
'
vs/base/browser/dom
'
;
import
{
domContentLoaded
,
addDisposableListener
,
EventType
,
EventHelper
,
detectFullscreen
,
addDisposableThrottledListener
}
from
'
vs/base/browser/dom
'
;
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
ILogService
,
ConsoleLogService
,
MultiplexLogService
}
from
'
vs/platform/log/common/log
'
;
import
{
ILogService
,
ConsoleLogService
,
MultiplexLogService
,
getLogLevel
}
from
'
vs/platform/log/common/log
'
;
import
{
ConsoleLogInAutomationService
}
from
'
vs/platform/log/browser/log
'
;
import
{
ConsoleLogInAutomationService
}
from
'
vs/platform/log/browser/log
'
;
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
BrowserWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/browser/environmentService
'
;
import
{
BrowserWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/browser/environmentService
'
;
...
@@ -152,11 +152,6 @@ class BrowserMain extends Disposable {
...
@@ -152,11 +152,6 @@ class BrowserMain extends Disposable {
// CONTRIBUTE IT VIA WORKBENCH.WEB.MAIN.TS AND registerSingleton().
// CONTRIBUTE IT VIA WORKBENCH.WEB.MAIN.TS AND registerSingleton().
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// Log
const
logsPath
=
URI
.
file
(
toLocalISOString
(
new
Date
()).
replace
(
/-|:|
\.\d
+Z$/g
,
''
)).
with
({
scheme
:
'
vscode-log
'
});
const
logService
=
new
BufferLogService
(
this
.
configuration
.
logLevel
);
serviceCollection
.
set
(
ILogService
,
logService
);
// Resource Identity
// Resource Identity
const
resourceIdentityService
=
this
.
_register
(
new
WebResourceIdentityService
());
const
resourceIdentityService
=
this
.
_register
(
new
WebResourceIdentityService
());
serviceCollection
.
set
(
IResourceIdentityService
,
resourceIdentityService
);
serviceCollection
.
set
(
IResourceIdentityService
,
resourceIdentityService
);
...
@@ -168,9 +163,14 @@ class BrowserMain extends Disposable {
...
@@ -168,9 +163,14 @@ class BrowserMain extends Disposable {
serviceCollection
.
set
(
IProductService
,
productService
);
serviceCollection
.
set
(
IProductService
,
productService
);
// Environment
// Environment
const
logsPath
=
URI
.
file
(
toLocalISOString
(
new
Date
()).
replace
(
/-|:|
\.\d
+Z$/g
,
''
)).
with
({
scheme
:
'
vscode-log
'
});
const
environmentService
=
new
BrowserWorkbenchEnvironmentService
({
workspaceId
:
payload
.
id
,
logsPath
,
...
this
.
configuration
},
productService
);
const
environmentService
=
new
BrowserWorkbenchEnvironmentService
({
workspaceId
:
payload
.
id
,
logsPath
,
...
this
.
configuration
},
productService
);
serviceCollection
.
set
(
IWorkbenchEnvironmentService
,
environmentService
);
serviceCollection
.
set
(
IWorkbenchEnvironmentService
,
environmentService
);
// Log
const
logService
=
new
BufferLogService
(
getLogLevel
(
environmentService
));
serviceCollection
.
set
(
ILogService
,
logService
);
// Remote
// Remote
const
remoteAuthorityResolverService
=
new
RemoteAuthorityResolverService
(
this
.
configuration
.
resourceUriProvider
);
const
remoteAuthorityResolverService
=
new
RemoteAuthorityResolverService
(
this
.
configuration
.
resourceUriProvider
);
serviceCollection
.
set
(
IRemoteAuthorityResolverService
,
remoteAuthorityResolverService
);
serviceCollection
.
set
(
IRemoteAuthorityResolverService
,
remoteAuthorityResolverService
);
...
...
src/vs/workbench/workbench.web.api.ts
浏览文件 @
10884cc3
...
@@ -153,7 +153,6 @@ enum ColorScheme {
...
@@ -153,7 +153,6 @@ enum ColorScheme {
HIGH_CONTRAST
=
'
hc
'
HIGH_CONTRAST
=
'
hc
'
}
}
interface
IInitialColorTheme
{
interface
IInitialColorTheme
{
/**
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录