提交 672b0b73 编写于 作者: J Joao Moreno

further sketch log service

上级 983a6909
......@@ -15,10 +15,10 @@ export interface ILogService {
trace(message: string, ...args: any[]): void;
debug(message: string, ...args: any[]): void;
verbose(message: string, ...args: any[]): void;
info(message: string, ...args: any[]): void;
warn(message: string, ...args: any[]): void;
error(message: string | Error, ...args: any[]): void;
critical(message: string | Error, ...args: any[]): void;
}
export class LegacyLogMainService implements ILogService {
......@@ -38,10 +38,6 @@ export class LegacyLogMainService implements ILogService {
// console.log(`\x1b[90m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, ...args);
}
verbose(message: string, ...args: any[]): void {
// console.log(`\x1b[90m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, ...args);
}
info(message: string, ...args: any[]): void {
if (this.environmentService.verbose) {
console.log(`\x1b[90m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, ...args);
......@@ -55,4 +51,8 @@ export class LegacyLogMainService implements ILogService {
warn(message: string | Error, ...args: any[]): void {
console.warn(`\x1b[93m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, ...args);
}
critical(message: string, ...args: any[]): void {
// console.log(`\x1b[90m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, ...args);
}
}
\ No newline at end of file
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { ILogService } from 'vs/platform/log/common/log';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
export class SpdLogService implements ILogService {
_serviceBrand: any;
constructor(
processName: string,
@IEnvironmentService environmentService: IEnvironmentService
) {
// TODO create logger
}
trace(message: string, ...args: any[]): void {
throw new Error('Method not implemented.');
}
debug(message: string, ...args: any[]): void {
throw new Error('Method not implemented.');
}
info(message: string, ...args: any[]): void {
throw new Error('Method not implemented.');
}
warn(message: string, ...args: any[]): void {
throw new Error('Method not implemented.');
}
error(message: string | Error, ...args: any[]): void {
throw new Error('Method not implemented.');
}
critical(message: string, ...args: any[]): void {
throw new Error('Method not implemented.');
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册