diff --git a/src/index.js b/src/index.js index d884df6..2d51f32 100644 --- a/src/index.js +++ b/src/index.js @@ -5,8 +5,9 @@ var util = require('util') , moment = require('moment') , fs = require('fs'); -var APP_NAME = "APP_NAME"; -var LOG_PATH = __dirname + "/log"; +var APP_NAME = "Mus.ec"; +var LOG_PATH = "./scribe"; +var MAIN_USER = "root"; // Logger information which will be read by the 'overload' function when // assigning the roles of each I/O scribes. @@ -83,12 +84,9 @@ var createdir = function(){ var overload = function() { - // Additional transports - console.realtime = console.info; - console.high = console.info; - console.normal = console.info; - console.low = console.info; - + for(var i in loggers.types) + console[i] = console.info; + // Assign this variable as write directory var dayiso = moment().isoWeekday(); // FIXME Remove this var fpath = logpath = createdir(); @@ -123,7 +121,7 @@ var overload = function() { // use the 'arguments' variable instead. var utfs = arguments.length == 1 && typeof arguments[0] === 'object' ? JSON.stringify(arguments[0], null, 4) : util.format.apply(util, arguments).trim() // Moment.js is a great time library for Node.js - , mtime = moment().format('MMMM Do YYYY, h:mm:ss A') + , mtime = moment().format('h:mm:ss A') // Used to show where the tags are to be placed. // I.e. [Memache] Message goes here. // Coldex holds the index of the first ']' @@ -194,45 +192,47 @@ var logger = function(req, res, next) { next(); } -var htmltemplate = ""; -var css = {}; -css['html,body'] = 'margin:0; border:none;float:none;display:block;padding:0;font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;background:#1c262f;overflow:hidden;'; -css['div'] = 'font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;font-size:11px;'; -css['html'] = 'background:#2A3946;padding:0;padding-left:50px;' -css['body'] = 'border-left: 1px solid rgba(255, 255, 255, 0.12);'; -css['.log-time'] = 'background: none;color: rgba(255, 255, 255, 0.24);padding:2px 5px;margin-right:2px;margin-left:-1px;font-size:11px;'; -css['.log-type'] = 'background: #633E3E;color: #C20404;padding:2px 5px;margin-right:2px;font-size:11px;'; -css['.log-line'] = 'height:auto;line-height:15px;color:#BEBEBE;font-size:11px;' -css['.button, .selected'] = "font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;background:#2C3338;text-align:center;width:100%;line-height:35px;height:35px;margin-bottom:5px;box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.11);" -css['.selected'] = "background:#4D5961;" -css['a'] = "background:none;text-decoration:none;font-size: 11px;color: #C2C2C2;padding: 10px;" - -htmltemplate+= "