
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@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
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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.