Nw.js: Stdout Logging For Windows

Created on 4 Jul 2017  路  6Comments  路  Source: nwjs/nw.js

I built my app using NWJS for windows.

While there is some GUI elements (why I used nwjs) a large portion is command line based.

I am really trying to find a way to write to the console.

the --enable-logging flag works but it is really ugly output that my users would have to work though and it all goes to stderr, when I have users who would be wanting to pipe the stdout and stderr to 2 different places a lot of the time.

I know that process.stdout.write() does not work for windows.

Is there a way anyone has found to write to the console without going through chromium?

Or is there somewhere in the source code that I can revert back to the node.js console.log way of doing things?

If none of these work, does anyone have a better option to use? The app is just about finished using node.js and nwjs. I would hate to have to switch to something else now, but If I can't send to stdout that might be where I am at.

question

All 6 comments

Please ask questions in our mailing list: https://groups.google.com/forum/#!forum/nwjs-general

NW is windows GUI application -- it has no console.

So it sounds like NWJS is not what I need then. The app is mainly CLI with a little GUI on top.

The web console component is fairly heavy and creates performance overhead, making it difficult to gauge such things effectively. It's unfortunate that your assertion that NW is a GUI-based app overrides any potential requirements from an apps' logging implementations or infrastructure.

I use the web console for debugging content and state during runtime, when necessary in a GUI-based app, as well as STDOUT and STDERR to output engine and app-specific details and error messages that can be picked up from external logging.

The trouble is that I'm hearing from some of my colleagues working within Windows that the logging appears to be broken. Upon further inspection, it appears that I am not seeing any of my logging output at all.

@jsalzano92 the discussion looks to be ongoing at https://github.com/nwjs/nw.js/issues/685

@slackjockey Thats why I was really needing the stdout AND stderr because of how the app was meant to be run.
I am glad it is still being talked about. However for me I just took out nwjs from the app. Running pure node.js and spawning an nwjs process when the display was needed.

Was this page helpful?
0 / 5 - 0 ratings