
Security News
TypeScript 6.0 Released: The Final JavaScript-Based Version
TypeScript 6.0 introduces new standard APIs, modern default settings, and deprecations as it prepares projects for the upcoming TypeScript 7.0 release.
@xylabs/logger
Advanced tools
XYLabs Logger Library
@xylabs/logger
Interface to handle overlap between Winston &
console with as much congruency as possible.
new ConsoleLogger(level): ConsoleLogger;
LogLevelValue = LogLevel.warn
ConsoleLogger
readonly level: LogLevelValue;
readonly logger: Logger;
get debug(): LogFunction;
get error(): LogFunction;
get info(): LogFunction;
get log(): LogFunction;
get trace(): LogFunction;
get warn(): LogFunction;
Interface to handle overlap between Winston &
console with as much congruency as possible.
new IdLogger(logger, id?): IdLogger;
() => string
IdLogger
set id(id): void;
string
void
debug(...data): void;
...unknown[]
void
Logger.debug
error(...data): void;
...unknown[]
void
Logger.error
info(...data): void;
...unknown[]
void
Logger.info
log(...data): void;
...unknown[]
void
Logger.log
trace(...data): void;
...unknown[]
void
Logger.trace
warn(...data): void;
...unknown[]
void
Logger.warn
Interface to handle overlap between Winston &
console with as much congruency as possible.
new LevelLogger(logger, level): LevelLogger;
LogLevelValue = LogLevel.warn
LevelLogger
readonly level: LogLevelValue;
readonly logger: Logger;
get debug(): LogFunction;
get error(): LogFunction;
get info(): LogFunction;
get log(): LogFunction;
get trace(): LogFunction;
get warn(): LogFunction;
A logger that does not log anything.
This is useful when you want to disable logging
like when running unit tests or in silent mode.
It implements the Logger interface but all methods
are no-op functions.
new SilentLogger(): SilentLogger;
SilentLogger
readonly debug: (..._data) => undefined = NoOpLogFunction;
...unknown[]
undefined
readonly error: (..._data) => undefined = NoOpLogFunction;
...unknown[]
undefined
readonly info: (..._data) => undefined = NoOpLogFunction;
...unknown[]
undefined
readonly log: (..._data) => undefined = NoOpLogFunction;
...unknown[]
undefined
readonly trace: (..._data) => undefined = NoOpLogFunction;
...unknown[]
undefined
readonly warn: (..._data) => undefined = NoOpLogFunction;
...unknown[]
undefined
function NoOpLogFunction(..._data): undefined;
...unknown[]
undefined
function getFunctionName(depth): string;
number = 2
string
Interface to handle overlap between Winston &
console with as much congruency as possible.
debug: LogFunction;
error: LogFunction;
info: LogFunction;
log: LogFunction;
trace: LogFunction;
warn: LogFunction;
type LogFunction = (...data) => void;
...unknown[]
void
type LogLevel = LogLevelValue;
Use LogLevelValue instead.
This name conflicts with the LogLevel enum and
makes it confusing to import
type LogLevelKey = EnumKey<typeof LogLevel>;
type LogLevelValue = EnumValue<typeof LogLevel>;
type LogVerbosity = LogLevelKey;
const LogLevel: Enum<{
error: 1;
warn: 2;
info: 3;
log: 4;
debug: 5;
trace: 6;
}>;
Part of sdk-js
See the LICENSE file for license details
FAQs
XYLabs Logger Library
The npm package @xylabs/logger receives a total of 202 weekly downloads. As such, @xylabs/logger popularity was classified as not popular.
We found that @xylabs/logger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers 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
TypeScript 6.0 introduces new standard APIs, modern default settings, and deprecations as it prepares projects for the upcoming TypeScript 7.0 release.

Security News
/Research
Newly published Trivy Docker images (0.69.4, 0.69.5, and 0.69.6) were found to contain infostealer IOCs and were pushed to Docker Hub without corresponding GitHub releases.

Research
/Security News
The worm-enabled campaign hit @emilgroup and @teale.io, then used an ICP canister to deliver follow-on payloads.