@btc-vision/logger
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

OPNet - Logger

Bitcoin TypeScript NodeJS NPM Gulp ESLint

code style: prettier

Introduction

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!

Getting Started

Prerequisites

  • Node.js version 16.x or higher
  • npm (Node Package Manager)

Installation

npm i @btc-vision/logger

Development

  1. Clone the repository:
    git clone https://github.com/btc-vision/logger.git
  2. Navigate to the repository directory:
    cd logger
  3. Install the required dependencies:
    npm i

Usage

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');
        // ...
    }
}

Contribution

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.

License

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.

Package Sidebar

Install

npm i @btc-vision/logger

Homepage

opnet.org

Weekly Downloads

233

Version

1.0.6

License

MIT

Unpacked Size

56.6 kB

Total Files

64

Last publish

Collaborators

  • blobmaster41