UNPKG

638 BPlain TextView Raw
1// Copyright (c) .NET Foundation. All rights reserved.
2// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3
4import { ILogger, LogLevel } from "./ILogger";
5
6/** A logger that does nothing when log messages are sent to it. */
7export class NullLogger implements ILogger {
8 /** The singleton instance of the {@link @microsoft/signalr.NullLogger}. */
9 public static instance: ILogger = new NullLogger();
10
11 private constructor() {}
12
13 /** @inheritDoc */
14 // tslint:disable-next-line
15 public log(_logLevel: LogLevel, _message: string): void {
16 }
17}