Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
base-log-factory
Advanced tools
Pluggable logging utility.
npm install --save base-log-factory
import { createFactory } from 'base-log-factory';
const factory = createFactory();
const logger = factory.getLogger('name');
logger.info('hello');
const logger = factory.getLogger('name2');
logger.error('hello2');
export interface IAppender {
log(messages: any[], logOpts: LogOptions): void;
dispose(): Promise<void>;
}
export type TLogLevel = 'ALL' | 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' | 'FATAL' | 'OFF';
export interface LoggerOptions {
level?: TLogLevel;
appender?: IAppender | IAppender[];
}
export interface LogOptions {
level: string;
method: string;
date: Date;
name: string;
}
export interface AppenderOptions {
[key: string]: any;
layout?: (messages: any[], logOpts: LogOptions) => any[];
}
export interface ILogger {
name: string;
level(l?: TLogLevel): TLogLevel | void;
trace(...args: any[]): void;
debug(...args: any[]): void;
info(...args: any[]): void;
warn(...args: any[]): void;
error(...args: any[]): void;
fatal(...args: any[]): void;
}
export interface IFactory {
getLogger(name?: string): ILogger;
setLevel(level: TLogLevel): void;
clear(): void;
}
export declare function format(date: Date, inputString?: string): string;
export declare function createAppender(opts?: AppenderOptions): IAppender;
export declare function createFactory(opts?: LoggerOptions): IFactory;
FAQs
Pluggable logging factory.
We found that base-log-factory demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.