microsoft/vscode-react-native
Publicmirrored from https://github.com/microsoft/vscode-react-nativeAvailable
src/common/log/streamLogFormatter.ts
19lines · 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 | * Logging utility class. |
| 6 | */ |
| 7 | |
| 8 | import {LogHelper} from "./logHelper"; |
| 9 | |
| 10 | export class StreamLogFormatter { |
| 11 | |
| 12 | public static getFormattedMessage(message: string) { |
| 13 | return `${LogHelper.MESSAGE_TAG} ${message}\n`; |
| 14 | } |
| 15 | |
| 16 | public static getFormattedInternalMessage(logLevel: string, message: string) { |
| 17 | return (`${LogHelper.INTERNAL_TAG} [${logLevel}] ${message}\n`); |
| 18 | } |
| 19 | } |