1.2.15 • Published 2 years ago

@infini-dev/logging v1.2.15

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Statements Branches Functions Lines

Infinisoft Dev is a set of developer's design patterns, scripts, templates and tools to make our lives easier and go faster. Faster, close to the speed of light!

Getting Started

Logger with an adapter for console log..

Common use case
Any output. For example, we use it to ouput data on external source like Sentry or Logrocket.

Install

Run of one these command to install.

$ npm i @infini-dev/logging

or

$ yarn add @infini-dev/slogging

Examples

Output all level.

import {storage} from '@infini-dev/logging'
const {error} = logging()

const saveDocument = (path: string, changes: string) => {
    
    // ... Implementation

   error("Failed to save..")

    // ... Implementation
}

Down the road requirement changes. You need to provide more output with multiple source. No problem, change the adaptor for another stoage without any changes to the implementation.

import {storage} from '@infini-dev/storage'
import {storageAdapterNode} from "@inifni-dev/storage/nodejs"
import {storageAdaperSentry} from "@infini-dev/sentry"
const _storage = storage([storageAdapterNode, storageAdaperSentry])

const saveDocument = (path: string, changes: string) => {
    
    // Same implementation

    storage.write(path, changes)
}

More details on www.infini-soft.com

Paid Contribution

Code for buck. You want to contribute? We will PAY for it! We are looking for collaborators to speed our eco system's development.

Powered 🚀 by Infinisoft Inc. Wanna code the future? Come with us https://www.infini-soft.com

1.2.15

2 years ago

1.2.14

2 years ago

1.2.13

2 years ago

1.2.12

2 years ago

1.2.11

2 years ago

1.2.10

2 years ago