refactor: apply review suggestions
Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
@@ -347,22 +347,6 @@ export const userInfoServiceFactory: () => ServiceFactory<
|
||||
'plugin'
|
||||
>;
|
||||
|
||||
// @public
|
||||
export class VoidLogger implements RootLoggerService {
|
||||
// (undocumented)
|
||||
child(_meta: JsonObject): LoggerService;
|
||||
// (undocumented)
|
||||
static create(): VoidLogger;
|
||||
// (undocumented)
|
||||
debug(_message: string, _meta?: JsonObject): void;
|
||||
// (undocumented)
|
||||
error(_message: string, _meta?: JsonObject): void;
|
||||
// (undocumented)
|
||||
info(_message: string, _meta?: JsonObject): void;
|
||||
// (undocumented)
|
||||
warn(_message: string, _meta?: JsonObject): void;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class WinstonLogger implements RootLoggerService {
|
||||
// (undocumented)
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright 2023 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
LoggerService,
|
||||
RootLoggerService,
|
||||
} from '@backstage/backend-plugin-api';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
|
||||
/**
|
||||
* An empty {@link @backstage/backend-plugin-api#LoggerService} implementation.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export class VoidLogger implements RootLoggerService {
|
||||
static create(): VoidLogger {
|
||||
return new VoidLogger();
|
||||
}
|
||||
|
||||
error(_message: string, _meta?: JsonObject): void {}
|
||||
|
||||
warn(_message: string, _meta?: JsonObject): void {}
|
||||
|
||||
info(_message: string, _meta?: JsonObject): void {}
|
||||
|
||||
debug(_message: string, _meta?: JsonObject): void {}
|
||||
|
||||
child(_meta: JsonObject): LoggerService {
|
||||
return new VoidLogger();
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,5 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { VoidLogger } from './VoidLogger';
|
||||
export { WinstonLogger } from './WinstonLogger';
|
||||
export type { WinstonLoggerOptions } from './WinstonLogger';
|
||||
|
||||
Reference in New Issue
Block a user