nl_tokens: Try to determine a platform - specific path where can write logs
pl_tokens: function findLogPath ( appName , fileName ) { fileName = fileName || 'log.log' ; var userData = appName ? null : utils . getUserData ( ) ; appName = appName || getAppName ( ) ; var homeDir = os . homedir ? os . homedir ( ) : process . env . HOME ; var dir ; switch ( process . <mask> ) { case 'darwin' : { dir = prepareDir ( homeDir , 'Library' , 'Logs' , appName ) . or ( userData ) . or ( homeDir , 'Library' , 'Application Support' , appName ) . result ; break ; } case 'win32' : { dir = prepareDir ( userData ) . or ( process . env . APPDATA , appName ) . or ( homeDir , 'AppData' , 'Roaming' , appName ) . result ; break ; } default : { dir = prepareDir ( userData ) . or ( process . env . XDG_CONFIG_HOME , appName ) . or ( homeDir , '.config' , appName ) . or ( process . env . XDG_DATA_HOME , appName ) . or ( homeDir , '.local' , 'share' , appName ) . result ; break ; } } if ( dir ) { return path . join ( dir , fileName ) ; } return false ; }