Skip to content

logs console application to write logs in realtime

Notifications You must be signed in to change notification settings

slaycky/logs-console

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logs Console CircleCI

Installation

NPM

$ npm install logs-console --save

Usage

Just include in your project

import LogsConsole from "logs-console";

create a init config

Params

Var Environment Description
APPLICATION_ID Id application at the server
AUTHENTICATION Authentication is a base64 CLIENT_ID:CLIENT_SECRET server generate
URL_SERVER URL of server to write logs.
ENVIRONMENT Enviroment can be DEVELOPMENT, PRODUCTION, STAGGING.
ENABLE_RESPONSE Enable to show at console response server.
LogsConsole.init(
  APPLICATION_ID,
  AUTHENTCATION,
  URL_SERVER,
  ENVIRONMENT,
  ENABLE_RESPONSE
);

Params

Option Description
TYPE_ERROR can be Success, Error, Warning, etc
CONTENT_ERROR Content of error.

Now you can use like that:

LogsConsole.console(CONTENT_ERROR, TYPE_ERROR);

or, if you need just show in terminal a console, you can import log property, follow an example below:

const { log } = require("logs-console");

log.success("This is a success message");
log.error("This is an error message");
log.warning("This is an warning message");
log.info("This is an info message");

About

logs console application to write logs in realtime

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published