homegames-common 0.3.0 → 0.3.1

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.
Files changed (2) hide show
  1. package/index.js +4 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -645,7 +645,7 @@ const log = {
645
645
  return;
646
646
  }
647
647
 
648
- const logPath = getConfigValue('LOG_PATH');
648
+ const logPath = getConfigValue('LOG_PATH', 'hg_log.txt');
649
649
 
650
650
  const msgString = `[HOMEGAMES-INFO][${new Date().toTimeString()}] ${msgToString(msg)}${explanation ? ':' + os.EOL + msgToString(explanation) : ''}${os.EOL}${os.EOL}`;
651
651
  fs.appendFile(logPath, msgString, (err) => {
@@ -663,7 +663,7 @@ const log = {
663
663
  return;
664
664
  }
665
665
 
666
- const logPath = getConfigValue('LOG_PATH');
666
+ const logPath = getConfigValue('LOG_PATH', 'hg_log.txt');
667
667
 
668
668
  const msgString = `[HOMEGAMES-ERROR][${new Date().toTimeString()}] ${msgToString(msg)}${explanation ? ':' + os.EOL + msgToString(explanation) : ''}${os.EOL}${os.EOL}`;
669
669
  fs.appendFile(logPath, msgString, (err) => {
@@ -676,7 +676,8 @@ const log = {
676
676
  debug: (msg, explanation) => {
677
677
  const logLevel = getLogLevel();
678
678
  const required = getLogLevel('DEBUG');
679
- const logPath = getConfigValue('LOG_PATH');
679
+
680
+ const logPath = getConfigValue('LOG_PATH', 'hg_log.txt');
680
681
 
681
682
  if (logLevel < required) {
682
683
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homegames-common",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Homegames common tools",
5
5
  "main": "index.js",
6
6
  "scripts": {