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

Stdout Logging For Windows #6005

Closed
jsalzano92 opened this issue Jul 4, 2017 · 6 comments
Closed

Stdout Logging For Windows #6005

jsalzano92 opened this issue Jul 4, 2017 · 6 comments
Labels

Comments

@jsalzano92
Copy link

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.

@Christywl
Copy link
Contributor

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

@rogerwang
Copy link
Member

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

@jsalzano92
Copy link
Author

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

@sal-ortiz
Copy link

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.

@sal-ortiz
Copy link

@jsalzano92 the discussion looks to be ongoing at #685

@jsalzano92
Copy link
Author

@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.

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

No branches or pull requests

4 participants