Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/extension/chatSessions/copilotcli/node/logger.ts
13405 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { ILogService } from '../../../../platform/log/common/logService';
7
8
export function getCopilotLogger(logService: ILogService) {
9
return {
10
isDebug: () => false,
11
debug: (msg: string) => logService.debug(msg),
12
log: (msg: string) => logService.trace(msg),
13
info: (msg: string) => logService.info(msg),
14
notice: (msg: string | Error) => logService.info(typeof msg === 'string' ? msg : msg.message),
15
warning: (msg: string | Error) => logService.warn(typeof msg === 'string' ? msg : msg.message),
16
error: (msg: string | Error) => logService.error(typeof msg === 'string' ? msg : msg.message),
17
startGroup: () => { },
18
endGroup: () => { }
19
};
20
}
21
22