coreybutler / node-windows

Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
Other
2.81k stars 356 forks source link

Allowing the user the use \n while outputting event logs #122

Closed markpeterfejes closed 6 years ago

markpeterfejes commented 8 years ago

This little piece of code allows the user to use line breaks using log.* ("messageline1 \nMessage line 2"); Previously if one was using this, the event wouldn't get logged at all.

coreybutler commented 8 years ago

I'm not sure I understand why a new batch file is being written. It seems like this could be done by modifying the command, i.e.

wincmd.elevate(batContents, callback)

batContents may need to be modified to pipe the output, but it seems like an overall more elegant approach. I'd rather not be writing files if possible.

markpeterfejes commented 8 years ago

I can understand that, but it doesn't seem to work without executing that in the batch file. If you can fix this issue another way, that would be really good :(

coreybutler commented 8 years ago

When you say it doesn't work, is it just not responding or are you seeing other kinds of errors?

markpeterfejes commented 8 years ago

If I pipe the output it just simply does not log the message that has a \n.