
Research
TeamPCP Compromises Telnyx Python SDK to Deliver Credential-Stealing Malware
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.
@xylabs/logger
Advanced tools
XYLabs Logger Library
@xylabs/logger
| Class | Description |
|---|---|
| ConsoleLogger | A LevelLogger that delegates to the global console object. |
| IdLogger | A logger wrapper that prefixes every log message with a bracketed identifier. Useful for distinguishing log output from different components or instances. |
| LevelLogger | A logger that filters messages based on a configured log level. Methods for levels above the configured threshold return a no-op function. |
| 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. |
| Interface | Description |
|---|---|
| Logger | Interface to handle overlap between Winston & console with as much congruency as possible. |
| Type Alias | Description |
|---|---|
| LogFunction | A generic logging function that accepts any number of arguments. |
| LogLevelKey | String key for a log level (e.g. 'error', 'warn', 'info'). |
| LogVerbosity | Alias for LogLevelKey, representing the verbosity setting as a string. |
| LogLevelValue | Numeric value of a log level (1 through 6). |
| Variable | Description |
|---|---|
| LogLevel | Numeric log level values, from least verbose (error=1) to most verbose (trace=6). |
| Function | Description |
|---|---|
| NoOpLogFunction | A log function that silently discards all arguments. |
| getFunctionName | Retrieves the name of the calling function by inspecting the stack trace. |
A LevelLogger that delegates to the global console object.
new ConsoleLogger(level?: LogLevelValue): ConsoleLogger;
| Parameter | Type | Default value |
|---|---|---|
level | LogLevelValue | LogLevel.warn |
ConsoleLogger
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
level | readonly | LogLevelValue | LevelLogger.level |
logger | readonly | Logger | LevelLogger.logger |
get debug(): LogFunction;
get error(): LogFunction;
get info(): LogFunction;
get log(): LogFunction;
get trace(): LogFunction;
get warn(): LogFunction;
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: Logger, id?: () => string): IdLogger;
| Parameter | Type |
|---|---|
logger | Logger |
id? | () => string |
IdLogger
set id(id: string): void;
| Parameter | Type |
|---|---|
id | string |
void
debug(...data: unknown[]): void;
| Parameter | Type |
|---|---|
...data | unknown[] |
void
Logger.debug
error(...data: unknown[]): void;
| Parameter | Type |
|---|---|
...data | unknown[] |
void
Logger.error
info(...data: unknown[]): void;
| Parameter | Type |
|---|---|
...data | unknown[] |
void
Logger.info
log(...data: unknown[]): void;
| Parameter | Type |
|---|---|
...data | unknown[] |
void
Logger.log
trace(...data: unknown[]): void;
| Parameter | Type |
|---|---|
...data | unknown[] |
void
Logger.trace
warn(...data: unknown[]): void;
| Parameter | Type |
|---|---|
...data | unknown[] |
void
Logger.warn
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: Logger, level?: LogLevelValue): LevelLogger;
| Parameter | Type | Default value |
|---|---|---|
logger | Logger | undefined |
level | LogLevelValue | LogLevel.warn |
LevelLogger
| Property | Modifier | Type |
|---|---|---|
level | readonly | LogLevelValue |
logger | readonly | 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
function NoOpLogFunction(..._data: unknown[]): undefined;
A log function that silently discards all arguments.
| Parameter | Type |
|---|---|
..._data | unknown[] |
undefined
function getFunctionName(depth?: number): string;
Retrieves the name of the calling function by inspecting the stack trace.
| Parameter | Type | Default value | Description |
|---|---|---|---|
depth | number | 2 | The stack frame depth to inspect (default: 2, the caller's caller). |
string
The function name, or '' if it cannot be determined.
Interface to handle overlap between Winston &
console with as much congruency as possible.
| Property | Type |
|---|---|
debug | LogFunction |
error | LogFunction |
info | LogFunction |
log | LogFunction |
trace | LogFunction |
warn | LogFunction |
type LogFunction = (...data: unknown[]) => void;
A generic logging function that accepts any number of arguments.
| Parameter | Type |
|---|---|
...data | unknown[] |
void
type LogLevelKey = EnumKey<typeof LogLevel>;
String key for a log level (e.g. 'error', 'warn', 'info').
type LogLevelValue = EnumValue<typeof LogLevel>;
Numeric value of a log level (1 through 6).
type LogVerbosity = LogLevelKey;
Alias for LogLevelKey, representing the verbosity setting as a string.
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).
Part of sdk-js
See the LICENSE file for license details
FAQs
XYLabs Logger Library
The npm package @xylabs/logger receives a total of 734 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.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.

Security News
/Research
Widespread GitHub phishing campaign uses fake Visual Studio Code security alerts in Discussions to trick developers into visiting malicious website.