1
0
Fork 0

logs - load config directly in module

master
Ruben Meyer 2 years ago
parent f79d5771f1
commit 5d13783ed5
Signed by: rxbn_
GPG Key ID: BE3BF898BE352FE2

@ -2,12 +2,13 @@ var methods = {};
let fs = require('fs');
let util = require('util');
var cfg = require(global['__dirname']+'/bin/config');
// save new line to file
newLine = (prefix, obj) => {
let date = new Date(); // current date
let filename = global['gds'].cfg.log.filename(); // filename
let dir = global['gds'].cfg.log.directory(); // directory
let filename = cfg.log.filename(); // filename
let dir = cfg.log.directory(); // directory
let path = dir + filename; // filepath
let fs_options = { // fs options for encoding, file mode and file flag
encoding: "utf8",

Loading…
Cancel
Save