More than your typical logger. Why not bring style to your logs? The OPNet logger library allows you to create and style logs for your OPNet applications. Written in TypeScript!
- Node.js version 16.x or higher
- npm (Node Package Manager)
npm i @btc-vision/logger
- Clone the repository:
git clone https://github.com/btc-vision/logger.git
- Navigate to the repository directory:
cd logger
- Install the required dependencies:
npm i
Here's a basic example of how to use the OPNet Transaction Builder library to create and sign a transaction:
import { Logger } from '@btc-vision/logger';
const logger = new Logger();
logger.info('This is an info message');
logger.warn('This is a warning message');
logger.error('This is an error message');
logger.debug('This is a debug message');
logger.debugBright('This is a debug message');
logger.traceLog('This is a trace message');
logger.panic('This is a panic message');
logger.securityNotice('This is a security notice message');
logger.important('This is an important message');
logger.fail('This is a fail message');
logger.success('This is a success message');
// ... or
class MyFunClass extends Logger {
constructor() {
super();
}
public myFunMethod() {
this.info('This is an info message');
this.warn('This is a warning message');
this.error('This is an error message');
this.debug('This is a debug message');
// ...
}
}
Contributions are welcome! Please read through the CONTRIBUTING.md
file for guidelines on how to submit issues,
feature requests, and pull requests. We appreciate your input and encourage you to help us improve OPNet.
This project is open source and available under the MIT License. If you have any suggestions or contributions, please feel free to submit a pull request.