Merge pull request #16200 from backstage/rugvip/nometa

backend-plugin-api: inlined LogMeta type
This commit is contained in:
Patrik Oldsberg
2023-02-07 14:20:34 +01:00
committed by GitHub
13 changed files with 212 additions and 73 deletions
@@ -14,10 +14,7 @@
* limitations under the License.
*/
/**
* @public
*/
export type LogMeta = { [name: string]: unknown };
import { JsonObject } from '@backstage/types';
/**
* A service that provides a logging facility.
@@ -25,10 +22,10 @@ export type LogMeta = { [name: string]: unknown };
* @public
*/
export interface LoggerService {
error(message: string, meta?: Error | LogMeta): void;
warn(message: string, meta?: Error | LogMeta): void;
info(message: string, meta?: Error | LogMeta): void;
debug(message: string, meta?: Error | LogMeta): void;
error(message: string, meta?: Error | JsonObject): void;
warn(message: string, meta?: Error | JsonObject): void;
info(message: string, meta?: Error | JsonObject): void;
debug(message: string, meta?: Error | JsonObject): void;
child(meta: LogMeta): LoggerService;
child(meta: JsonObject): LoggerService;
}
@@ -30,7 +30,7 @@ export type {
LifecycleServiceShutdownHook,
LifecycleServiceShutdownOptions,
} from './LifecycleService';
export type { LoggerService, LogMeta } from './LoggerService';
export type { LoggerService } from './LoggerService';
export type { PermissionsService } from './PermissionsService';
export type { PluginMetadataService } from './PluginMetadataService';
export type { RootHttpRouterService } from './RootHttpRouterService';