Avoid excessive trace logging (microsoft/vscode#197549)
This commit is contained in:
Родитель
39b560fcd9
Коммит
b8c064bbd6
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vscode/proxy-agent",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"description": "NodeJS http(s) agent implementation for VS Code",
|
||||
"main": "out/index.js",
|
||||
"types": "out/index.d.ts",
|
||||
|
|
|
@ -659,9 +659,12 @@ export function toLogString(args: any[]) {
|
|||
const t = typeof value;
|
||||
if (t === 'object') {
|
||||
if (key) {
|
||||
if (key === '_vscodeAdditionalCaCerts' && Array.isArray(value)) {
|
||||
if ((key === 'ca' || key === '_vscodeAdditionalCaCerts') && Array.isArray(value)) {
|
||||
return `[${value.length} certs]`;
|
||||
}
|
||||
if (key === 'ca' && (typeof value === 'string' || Buffer.isBuffer(value))) {
|
||||
return `[${(value.toString().match(/-----BEGIN CERTIFICATE-----/g) || []).length} certs]`;
|
||||
}
|
||||
return !value || value.toString ? String(value) : Object.prototype.toString.call(value);
|
||||
} else {
|
||||
return value;
|
||||
|
|
Загрузка…
Ссылка в новой задаче