Add exports
This commit is contained in:
parent
6daf815ea8
commit
eeed068ddd
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "logging",
|
"name": "logging",
|
||||||
"version": "3.0.3",
|
"version": "3.0.4",
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
||||||
"contributors": [],
|
"contributors": [],
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hibas123/logging",
|
"name": "@hibas123/logging",
|
||||||
"version": "3.0.3",
|
"version": "3.0.4",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "out/index.js",
|
"main": "out/index.js",
|
||||||
"types": "out/index.d.ts",
|
"types": "out/index.d.ts",
|
||||||
|
17
src/base.ts
17
src/base.ts
@ -6,28 +6,13 @@ import {
|
|||||||
Format,
|
Format,
|
||||||
FormatConfig,
|
FormatConfig,
|
||||||
Formatted,
|
Formatted,
|
||||||
|
ILoggingInterface,
|
||||||
LoggingTypes,
|
LoggingTypes,
|
||||||
Message,
|
Message,
|
||||||
} from "./types.js";
|
} from "./types.js";
|
||||||
|
|
||||||
const browser = typeof window !== "undefined";
|
const browser = typeof window !== "undefined";
|
||||||
|
|
||||||
export interface ILoggingTimer {
|
|
||||||
end: () => number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ILoggingInterface {
|
|
||||||
debug(...message: any[]): void;
|
|
||||||
log(...message: any[]): void;
|
|
||||||
warn(...message: any[]): void;
|
|
||||||
error(...message: any[]): void;
|
|
||||||
|
|
||||||
time(name?: string): ILoggingTimer;
|
|
||||||
timeEnd(id: string): number;
|
|
||||||
|
|
||||||
getChild(name: string): ILoggingInterface;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ILoggingOptions {
|
export interface ILoggingOptions {
|
||||||
/**
|
/**
|
||||||
* Name will be prefixed on Console output and added to logfiles, if not specified here
|
* Name will be prefixed on Console output and added to logfiles, if not specified here
|
||||||
|
@ -14,6 +14,8 @@ export {
|
|||||||
TerminalFormats,
|
TerminalFormats,
|
||||||
Formatted,
|
Formatted,
|
||||||
IFormatted,
|
IFormatted,
|
||||||
|
ILoggingInterface,
|
||||||
|
ILoggingTimer,
|
||||||
} from "./types.js";
|
} from "./types.js";
|
||||||
|
|
||||||
const Logging = new LoggingBase();
|
const Logging = new LoggingBase();
|
||||||
|
16
src/types.ts
16
src/types.ts
@ -234,3 +234,19 @@ export interface Adapter {
|
|||||||
*/
|
*/
|
||||||
close?(): void;
|
close?(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ILoggingTimer {
|
||||||
|
end: () => number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ILoggingInterface {
|
||||||
|
debug(...message: any[]): void;
|
||||||
|
log(...message: any[]): void;
|
||||||
|
warn(...message: any[]): void;
|
||||||
|
error(...message: any[]): void;
|
||||||
|
|
||||||
|
time(name?: string): ILoggingTimer;
|
||||||
|
timeEnd(id: string): number;
|
||||||
|
|
||||||
|
getChild(name: string): ILoggingInterface;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user