Allow mingling of DiskDump logConsole() output with the web server's log
This commit is contained in:
parent
e0487bccd8
commit
ef4c043fab
6 changed files with 878 additions and 818 deletions
|
|
@ -64,6 +64,11 @@ var HTMLOut;
|
|||
*/
|
||||
var sServerRoot = "";
|
||||
|
||||
/*
|
||||
* logFile is set by HTMLOut, allowing us to "mingle" our output with the server's log (typically "./logs/node.log").
|
||||
*/
|
||||
var logFile = null;
|
||||
|
||||
/*
|
||||
* Entries in this table are matched first, as-is, to req.path (no string or RegExp compare involved);
|
||||
* we do, however, strip any trailing slash from the incoming path before doing the lookup, so none of
|
||||
|
|
@ -140,6 +145,16 @@ function HTTPAPI(out, sRoot) {
|
|||
sServerRoot = sRoot;
|
||||
}
|
||||
|
||||
/**
|
||||
* setLogFile(file)
|
||||
*
|
||||
* @param {Object} file
|
||||
*/
|
||||
HTTPAPI.setLogFile = function(file) {
|
||||
logFile = file;
|
||||
DiskDump.setLogFile(file);
|
||||
};
|
||||
|
||||
/**
|
||||
* @class Volume
|
||||
* @property {number|null} fd file descriptor
|
||||
|
|
|
|||
Loading…
Reference in a new issue