0.0.5 • Published 4 years ago
ay-logs-to-file v0.0.5
AyLogsToFile
A simple JS based application event logging package. Features include: => Ability to log errors,informations,debug
Installation npm i ay-logs-to-file --save
How to use
const log = require('ay-logs-to-file');
var FilePath = 'C:\My_directory_where_i_want_to_drop_the_log_files\';
var LogContent = 'what i want to log';
//to log errors
log.LogEventError(FilePath,LogContent);
//to log information
log.LogEventInfo(FilePath,LogContent);
//to log debug
log.LogEventDebug(FilePath,LogContent);
//Output Format
File name = ApplicationLogs2019-12-18.log
Content
December 18th 2019, 10:45:24 am||Error||||what i want to log
December 18th 2019, 10:48:35 am||Information||||what i want to log
December 18th 2019, 10:49:08 am||Debug||||what i want to log