New GenieACS - logger in extensions?


How do you require logger in extensions in the new version of GenieACS? The logger.js file no longer exists at the old location.

You can’t. The file logger.js wasn’t supposed to be required from extension scripts in the first place. Why not use console.log?

I tried console.log, and it doesn’t error out, but I couldn’t figure out where the output is going. It doesn’t seem to be going into the cwmp log anymore at least.

You’re right. It goes to stdout of the process which may not be the same as the log output depending on your config. Just committed a fix for that. Both stdout and stderr should now print into the process log (not access log) with the difference being that stdout lines are displayed as an INFO log while those from stderr are displayed as a WARN log. Let me know what you think.

1 Like

Thank you for addressing this issue. This is why I had included logger in my ext scripts. Which have obviously become very popular :smiley:.

1 Like