0.0.13 • Published 7 years ago

@derherrgammler/simple-file-logger v0.0.13

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

LogFile-Creator for Nodejs

An npm Modul for Node.js Log all your important messages in files to read them later.

Installation to Node dependency

  1. Make shure that you have simple-file-logger installed locally:
npm i @derherrgammler/simple-file-logger
  1. Require and usage:
var logger = require("@derherrgammler/simple-file-logger");

var sMessage = "This is the text that will be logged!";
var oOptions = {
    // This is the Object with all settings for the specific log data
    // For more information scroll down
    "bConsole"  : false,
    "sFilename" : "mydata"
};
logger.log(sMessage, oOptions);

Option setting for logging

Every Option beginns with b for boolean or an s for string. This is the wanted input.

bConsole: The log-Message will be shown in your console (Default: true) bFile: The log-Message will be written into the file (Default: true) bLogDate: The log-Message will get a log-Time (Default: true) sFilename: You can change the filename for the logs. The Default has some presets for the choosen sType. (Default: default) sExtansion: This is the extention of your file. (Default: log) sPath: The directory where the file will be placed. (Default: .tmp) sType: The type of your log-Message. Presets are info, warn and error but you can set also other values. (Default: default) sSeparator: The separator between the bLogDate the sType and your message. (Default: ]-----[)

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago