3.1.8 • Published 3 years ago
txt-logger v3.1.8
Installation
Install it using npm :
$ npm install txt-logger
Actually not available with yarn
Getting started
Import the module in your code with the following line :
const txt-logger = require('txt-logger');
Usage
Create your own log, with the date (automatically set), the title (required) and your log (required) and the path (required) :
txt-logger.log({title : "your log's title here", log : "your log's content here", path : "path_to_your_log"}, (err) =>{
console.log(err)
})
Search if your log contains a value, with the path (required), and the value you want to search :
txt-logger.search({value : "the value you want to search", path : "path_to_your_log"}, (err) =>{
console.log(err)
})