lib/stdlog.js
function getLogDirectoryElements(settings) {
        var elements,
            platform = process.platform;

        if (settings.logRoot) {
            elements = [settings.logRoot, settings.module];
        } else if (platform === "darwin") {
            elements = [process.env.HOME, "Library", "Logs", settings.vendor, settings.application, settings.module];
        } else if (platform === "win32") {
            elements = [process.env.APPDATA, settings.vendor, settings.application, settings.module, "logs"];
        } else {
            elements = [process.env.HOME, settings.vendor, settings.application, settings.module, "logs"];
        }
        
        return elements;
    }
function getLogDirectoryElements(settings) {
        var elements,
            platform = process.platform;

        if (settings.logRoot) {
            elements = [settings.logRoot, settings.module];
        } else if (platform === "darwin") {
            elements = [process.env.HOME, "Library", "Logs", settings.vendor, settings.application, settings.module];
        } else if (platform === "win32") {
            elements = [process.env.APPDATA, settings.vendor, settings.application, settings.module, "logs"];
        } else {
            elements = [process.env.HOME, settings.vendor, settings.application, settings.module, "logs"];
        }
        
        return elements;
    }
function getLogDirectoryElements ( settings ) { var elements , platform = process . platform ; if ( settings . logRoot ) { elements = [ settings . logRoot , settings . module ] ; } else if ( platform === "darwin" ) { elements = [ process . env . HOME , "Library" , "Logs" , settings . vendor , settings . application , settings . module ] ; } else if ( platform === "win32" ) { elements = [ process . env . APPDATA , settings . vendor , settings . application , settings . module , "logs" ] ; } else { elements = [ process . env . HOME , settings . vendor , settings . application , settings . module , "logs" ] ; } return elements ; }
Define the log directory as an array so we can easily create the individual subdirectories if necessary, without requiring an external library like mkdirp
Define the log directory as an array so we can easily create the individual subdirectories if necessary without requiring an external library like mkdirp