homegames-common 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -678,15 +678,15 @@ const log = {
|
|
|
678
678
|
info: (msg, explanation = null) => {
|
|
679
679
|
if (electronLogger) {
|
|
680
680
|
electronLogger.info(msgToString(msg));
|
|
681
|
-
} else {
|
|
681
|
+
}// else {
|
|
682
682
|
const logLevel = getLogLevel();
|
|
683
683
|
const required = getLogLevel('INFO');
|
|
684
684
|
|
|
685
685
|
if (logLevel < required) {
|
|
686
|
-
return;
|
|
686
|
+
// return;
|
|
687
687
|
}
|
|
688
688
|
|
|
689
|
-
const logPath = getConfigValue('LOG_PATH', 'hg_log.txt');
|
|
689
|
+
const logPath = path.join(getAppDataPath(), 'hg-log.txt');//getConfigValue('LOG_PATH', 'hg_log.txt');
|
|
690
690
|
|
|
691
691
|
const msgString = `[HOMEGAMES-INFO][${new Date().toTimeString()}] ${msgToString(msg)}${explanation ? ':' + os.EOL + msgToString(explanation) : ''}${os.EOL}${os.EOL}`;
|
|
692
692
|
fs.appendFile(logPath, msgString, (err) => {
|
|
@@ -695,7 +695,7 @@ const log = {
|
|
|
695
695
|
console.log(err);
|
|
696
696
|
}
|
|
697
697
|
});
|
|
698
|
-
}
|
|
698
|
+
//}
|
|
699
699
|
},
|
|
700
700
|
error: (msg, explanation) => {
|
|
701
701
|
if (electronLogger) {
|