Giter VIP home page Giter VIP logo

logger's Introduction

๐Ÿ’ป Logger

CI Tests npm version

๐Ÿ“„ About

A simple and lightweight logger.

๐Ÿ“ฆ Installation

npm install -D @sdanialraza/logger
yarn add -D @sdanialraza/logger
pnpm add -D @sdanialraza/logger
bun add -D @sdanialraza/logger

Usage

Importing

// CommonJS
const { Logger } = require('@sdanialraza/logger');
// ES Modules
import { Logger } from '@sdanialraza/logger';

Creating a Logger instance

const logger = new Logger();

Logging

// Using your logger instance
logger.critical('Hello, world!');
logger.debug('Hello, world!');
logger.error('Hello, world!');
logger.log('Hello, world!');
logger.info('Hello, world!');
logger.warn('Hello, world!');

// Passing in options
logger.log('Hello, world!', {
    logsFilePath: "test.log",
    timestamp: {
        hour: "numeric",
        minute: "numeric",
        second: "numeric",
    }
});

// Using static methods
Logger.critical('Hello, world!');
Logger.debug('Hello, world!');
Logger.error('Hello, world!');
Logger.log('Hello, world!');
Logger.info('Hello, world!');
Logger.warn('Hello, world!');

๐Ÿค Contributing

Pull requests are welcome, and very much appreciated. But before you start working on a pull request, please make sure to open an issue first, so that we can discuss the changes you want to make.

โš–๏ธ License

This project is licensed under the MIT License.

logger's People

Contributors

github-actions[bot] avatar renovate[bot] avatar sdanialraza avatar

Watchers

 avatar

logger's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/publish.yml
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/setup-node v4
  • changesets/action v1
.github/workflows/tests.yml
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/setup-node v4
npm
package.json
  • @changesets/cli ^2.27.1
  • @commitlint/cli ^19.0.0
  • @commitlint/config-angular ^19.0.0
  • @types/node ^20.11.17
  • esbuild-plugin-version-injector ^1.2.1
  • eslint ^8.56.0
  • eslint-config-neon ^0.1.58
  • eslint-plugin-prettier ^5.1.3
  • husky ^9.0.10
  • is-ci ^3.0.1
  • kolorist ^1.8.0
  • lint-staged ^15.2.2
  • prettier ^3.2.5
  • terser ^5.27.0
  • tsup ^8.0.1
  • typescript ^5.3.3
  • vitest ^1.2.2

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.