Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging not working (or found) on MacOS #88

Open
wkhan69 opened this issue Aug 1, 2021 · 1 comment
Open

Logging not working (or found) on MacOS #88

wkhan69 opened this issue Aug 1, 2021 · 1 comment

Comments

@wkhan69
Copy link

wkhan69 commented Aug 1, 2021

Hi,
I've downloaded the MacOS tplink-monitor-macos tool and ran it. It seems to work fine except I cannot find any logs. The dashboard appears fine, but when I look in the local director that contains the tool executable, there are no logs produced. I even tried running in admin mode (using the sudo command). The terminal output is as follows:

Wills-MBP:~ willkhan$ sudo /Users/willkhan/Downloads/tplink-monitor-macos/tplink-monitor-macos
Password:
Logger config file: "logger-config.json"
Error reading logger config. Reverting to defaults. { Error: ENOENT: no such file or directory, open 'logger-config.json'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.openSync (pkg/prelude/bootstrap.js:483:32)
at Object.fs.readFileSync (fs.js:551:33)
at Object.fs.readFileSync (pkg/prelude/bootstrap.js:675:36)
at loadLogConfig (/snapshot/tplink-energy-monitor/services/data-logger.js:0:0)
at Object. (/snapshot/tplink-energy-monitor/services/data-logger.js:0:0)
at Module._compile (pkg/prelude/bootstrap.js:1243:22)
at Object.Module._extensions..js (module.js:644:10)
at Module.load (module.js:552:32)
at tryModuleLoad (module.js:495:12)
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: 'logger-config.json' }
Log directory path: "."
...

The first error (4th line) , I'm guessing, is not a real error, but just an indication that the tool could not find a custom logging configuration. (I'm fine with the default config). Any ideas?

@wkhan69
Copy link
Author

wkhan69 commented Aug 5, 2021

Problem is fixed:
I run it from the command line, explicitly adding the log configuration file. ie:
./tplink-monitor-macos logger-config.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant