1.0.3 • Published 2 years ago
save-log-file v1.0.3
Save Log File
This project is done to create a log simple and easy to use by any programmer, the intention is to facilitate the creation and insertion of parameters in a fileLog file
Prerequisites
This project requires NodeJS (version 8 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
6.4.1
v8.16.0
Table of contents
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Installation
BEFORE YOU INSTALL: please read the prerequisites
Start with cloning this repo on your local machine:
$ npm install save-log-file
Usage
destructuring
let { settings, logSuccess } = require('save-log-file');
settings(true);
logSuccess('test','this is a test');
get-all
let saveLogFile = require('save-log-file');
saveLogFile.settings(true);
saveLogFile.logSuccess('test','this is a test');
Functions
Type | values | Description |
---|---|---|
settings | boolean | Set true if you want print in console |
logSuccess | string, string | The first parameter is the function and the other is the description, print de success log |
logInfo | string, string | The first parameter is the function and the other is the description, print de info log |
logError | string, string | The first parameter is the function and the other is the description, print de error log |
logWarning | string, string | The first parameter is the function and the other is the description, print de warning log |
logFatal | string, string | The first parameter is the function and the other is the description, print de fatal log |
Authors
- Oscar Johnson - Initial work - Oscar Johnson