1.0.2 • Published 2 years ago

logs-maker v1.0.2

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

Logs Maker

Easy way of creating log files

Create and update files with a log structure

Install

Install with npm:

$ npm install --save logs-maker

Usage

var log = require('logs-maker');

log.logMessage({
  title: "Error",
  message: "Something gone wrong!",
  directory: './logs',
  filename: 'errors.txt',
});

Properties

PropertyTypeDescriptionDefault value
titleSTRINGCan be something distinctive aboute the log
messageSTRINGContent of the log
directorySTRINGDirectory where the file is located"./"
filenameSTRINGCan be something distinctive aboute the log"log.txt"
withIdBOOLEANIf true it will show a random id for the logtrue
withDateBOOLEANIf true it will show the date of creation of the logtrue
withSeparatorBOOLEANIf true it will show a separator for the logtrue
customSeparatorSTRINGCustom separator to replace the default separator""