1.0.20 • Published 1 year ago

@premmia/logs v1.0.20

Weekly downloads
-
License
MIT License
Repository
-
Last release
1 year ago

Logs library for Premmia backend's projects

This library have to be used in backend projects to write logs in cloud watch using the same log library (winston). It is going to standardize all project logs.

Prerequisites

This project requires NodeJS (version 14 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.

$ npm -v && node -v

Table of contents

Installation

BEFORE YOU INSTALL: please read the prerequisites

Start with cloning this repo on your local machine:

$ git clone https://github.com/mesainc/vibra-libraries
$ cd vibra-libraries

To install and set up the library, run:

$ npm install

Usage

To work on this library you have to stay in its package, so you can run the follow command:

$ cd packages/logs

Serving the app

$ npm start

Running the tests

$ npm test

Building a distribution version

$ npm run build

This task will create a distribution version of the project inside your local dist/ folder

Functions

setting up a context

import { setContext } from '@premmia/logs';

setContext('MY_CONTEXT);

Logging a INFO message

import { logInfo } from '@premmia/logs';

logInfo('some message);

Logging a WARN message

import { logWarn } from '@premmia/logs';

logWarn('some message);

Logging a ERROR message

import { logError } from '@premmia/logs';

logError('some message);

Logging a DEBUG message

import { logDebug } from '@premmia/logs';

logDebug('some message);

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Add your changes: git add .
  4. Commit your changes: git commit -am 'Add some feature'
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request :sunglasses:

Authors

License

MIT License © Andrea SonnY

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.20

1 year ago

1.0.11

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.13

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.5

1 year ago