microsoft/vscode-react-native
Publicmirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable
src/common/log/outputChannelLogFormatter.ts
23lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT license. See LICENSE file in the project root for details. |
| 3 | |
| 4 | /** |
| 5 | * Formatter for the Output channel. |
| 6 | */ |
| 7 | |
| 8 | import {LogHelper} from "./logHelper"; |
| 9 | |
| 10 | export class OutputChannelLogFormatter { |
| 11 | |
| 12 | public static getFormattedMessage(message: string) { |
| 13 | return OutputChannelLogFormatter.getFormattedOutputChannelString(message); |
| 14 | } |
| 15 | |
| 16 | public static getFormattedInternalMessage(logLevel: string, message: string) { |
| 17 | return (`${LogHelper.INTERNAL_TAG} [${logLevel}] ${message}`); |
| 18 | } |
| 19 | |
| 20 | private static getFormattedOutputChannelString(message: string) { |
| 21 | return `######### ${message} ##########`; |
| 22 | } |
| 23 | } |