
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@ao-framework/logger
Advanced tools
The logger is an abstract class that allows you to create custom loggers where you can define a specific implementation without having to worry about specific methods commonly used in the practice of logging information in applications.
Logger
The logger is an abstract class that allows you to create custom loggers where you can define the functionality implementation without having to worry about implementing commonly used methods in the practice of logging information. It provides for both sync and async functionality.
import Logger from "@ao-framework/logger";
export class MyLogger extends Logger {
protected async implementation(level: string, message: string) {
//do something with your message
}
protected implementationSync(level: string, message: string) {
//do something with your message
}
}
export default new MyLogger();
import mylogger from "./loggers/mylogger"
//either below will work
mylogger.info(`This is a log message for ${user.name}`)
mylogger.info("This is a log message for ${user.name}", user)
logger.emergency(message: string, context?: object) => Promise<any>
//or
logger.emergencySync(message: string, context?: object) => any
logger.alert(message: string, context?: object) => Promise<any>
//or
logger.alertSync(message: string, context?: object) => any
logger.critical(message: string, context?: object) => Promise<any>
//or
logger.criticalSync(message: string, context?: object) => any
logger.error(message: string, context?: object) => Promise<any>
//or
logger.errorSync(message: string, context?: object) => any
logger.warning(message: string, context?: object) => Promise<any>
//or
logger.warningSync(message: string, context?: object) => any
logger.notice(message: string, context?: object) => Promise<any>
//or
logger.noticeSync(message: string, context?: object) => any
logger.info(message: string, context?: object) => Promise<any>
//or
logger.infoSync(message: string, context?: object) => any
logger.debug(message: string, context?: object) => Promise<any>
//or
logger.debugSync(message: string, context?: object) => any
logger.log(level: string, message: string, context?: object) => Promise<any>
//or
logger.logSync(level: string, message: string, context?: object) => any
FAQs
The logger is an abstract class that allows you to create custom loggers where you can define a specific implementation without having to worry about specific methods commonly used in the practice of logging information in applications.
The npm package @ao-framework/logger receives a total of 7 weekly downloads. As such, @ao-framework/logger popularity was classified as not popular.
We found that @ao-framework/logger demonstrated a not healthy version release cadence and project activity because the last version was released 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.