mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-14 01:25:43 -05:00
Adds ExtensionOutputChannelName to constants
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
export const ExtensionId = 'gitlens';
|
||||
export const ExtensionKey = ExtensionId;
|
||||
export const ExtensionOutputChannelName = 'GitLens';
|
||||
export const QualifiedExtensionId = `eamodio.${ExtensionId}`;
|
||||
|
||||
export const ApplicationInsightsKey = 'a9c302f8-6483-4d01-b92c-c159c799c679';
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
'use strict';
|
||||
import { ExtensionContext, OutputChannel, window, workspace } from 'vscode';
|
||||
import { IConfig } from './configuration';
|
||||
import { ExtensionKey } from './constants';
|
||||
import { ExtensionKey, ExtensionOutputChannelName } from './constants';
|
||||
import { Telemetry } from './telemetry';
|
||||
|
||||
const OutputChannelName = 'GitLens';
|
||||
const ConsolePrefix = `[${OutputChannelName}]`;
|
||||
const ConsolePrefix = `[${ExtensionOutputChannelName}]`;
|
||||
|
||||
export type OutputLevel = 'silent' | 'errors' | 'verbose';
|
||||
export const OutputLevel = {
|
||||
@@ -29,7 +28,7 @@ function onConfigurationChanged() {
|
||||
output && output.dispose();
|
||||
}
|
||||
else {
|
||||
output = output || window.createOutputChannel(OutputChannelName);
|
||||
output = output || window.createOutputChannel(ExtensionOutputChannelName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,7 +42,7 @@ export class Logger {
|
||||
|
||||
static log(message?: any, ...params: any[]): void {
|
||||
if (debug && level !== OutputLevel.Silent) {
|
||||
console.log(ConsolePrefix, message, ...params, '\n');
|
||||
console.log(ConsolePrefix, message, ...params);
|
||||
}
|
||||
|
||||
if (level === OutputLevel.Verbose) {
|
||||
@@ -53,7 +52,7 @@ export class Logger {
|
||||
|
||||
static error(ex: Error, classOrMethod?: string, ...params: any[]): void {
|
||||
if (debug) {
|
||||
console.error(ConsolePrefix, classOrMethod, ex, ...params, '\n');
|
||||
console.error(ConsolePrefix, classOrMethod, ex, ...params);
|
||||
}
|
||||
|
||||
if (level !== OutputLevel.Silent) {
|
||||
@@ -65,7 +64,7 @@ export class Logger {
|
||||
|
||||
static warn(message?: any, ...params: any[]): void {
|
||||
if (debug) {
|
||||
console.warn(ConsolePrefix, message, ...params, '\n');
|
||||
console.warn(ConsolePrefix, message, ...params);
|
||||
}
|
||||
|
||||
if (level !== OutputLevel.Silent) {
|
||||
|
||||
Reference in New Issue
Block a user