
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@xylabs/logger
Advanced tools
XYLabs Logger Library
Using npm:
npm install {{name}}
Using yarn:
yarn add {{name}}
Using pnpm:
pnpm add {{name}}
Using bun:
bun add {{name}}
See the LICENSE file for license rights and limitations (LGPL-3.0-only).
### .temp-typedoc
### classes
### <a id="ConsoleLogger"></a>ConsoleLogger
A LevelLogger that delegates to the global console object.
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;
### <a id="IdLogger"></a>IdLogger
A logger wrapper that prefixes every log message with a bracketed identifier. Useful for distinguishing log output from different components or instances.
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
### <a id="LevelLogger"></a>LevelLogger
A logger that filters messages based on a configured log level. Methods for levels above the configured threshold return a no-op function.
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 id="SilentLogger"></a>SilentLogger
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;
A log function that silently discards all arguments.
...unknown[]
undefined
readonly error: (..._data) => undefined = NoOpLogFunction;
A log function that silently discards all arguments.
...unknown[]
undefined
readonly info: (..._data) => undefined = NoOpLogFunction;
A log function that silently discards all arguments.
...unknown[]
undefined
readonly log: (..._data) => undefined = NoOpLogFunction;
A log function that silently discards all arguments.
...unknown[]
undefined
readonly trace: (..._data) => undefined = NoOpLogFunction;
A log function that silently discards all arguments.
...unknown[]
undefined
readonly warn: (..._data) => undefined = NoOpLogFunction;
A log function that silently discards all arguments.
...unknown[]
undefined
### functions
### <a id="NoOpLogFunction"></a>NoOpLogFunction
function NoOpLogFunction(..._data): undefined;
A log function that silently discards all arguments.
...unknown[]
undefined
### <a id="getFunctionName"></a>getFunctionName
function getFunctionName(depth?): string;
Retrieves the name of the calling function by inspecting the stack trace.
number = 2
The stack frame depth to inspect (default: 2, the caller's caller).
string
The function name, or '' if it cannot be determined.
### interfaces
### <a id="Logger"></a>Logger
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-aliases
### <a id="LogFunction"></a>LogFunction
type LogFunction = (...data) => void;
A generic logging function that accepts any number of arguments.
...unknown[]
void
### <a id="LogLevelKey"></a>LogLevelKey
type LogLevelKey = EnumKey<typeof LogLevel>;
String key for a log level (e.g. 'error', 'warn', 'info').
### <a id="LogLevelValue"></a>LogLevelValue
type LogLevelValue = EnumValue<typeof LogLevel>;
Numeric value of a log level (1 through 6).
### <a id="LogVerbosity"></a>LogVerbosity
type LogVerbosity = LogLevelKey;
Alias for LogLevelKey, representing the verbosity setting as a string.
### variables
### <a id="LogLevel"></a>LogLevel
const LogLevel: Enum<{
error: 1;
warn: 2;
info: 3;
log: 4;
debug: 5;
trace: 6;
}>;
Numeric log level values, from least verbose (error=1) to most verbose (trace=6).
FAQs
XYLabs Logger Library
The npm package @xylabs/logger receives a total of 5,013 weekly downloads. As such, @xylabs/logger popularity was classified as 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.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.