LaserWeb / deprecated-LaserWeb3

Open Source Laser Cutter / Engraver software. Supports gcode, svg, dxf, stl, png, jpg, bmp
265 stars 68 forks source link

Log-to-file request (not a bug) #214

Closed donkjr closed 7 years ago

donkjr commented 7 years ago

I found the console output [c:\program files\nodejs\node.exe] while LW is running very useful for troubleshooting, but the screen scrolls until history is out of view. An option to push this to a log file would be a great troubleshooting feature.

tbfleming commented 7 years ago

On Linux you can node args 2>&1 | tee log_filename

ghost commented 7 years ago

On windows http://www.robvanderwoude.com/battech_redirection.php

cprezzi commented 7 years ago

I will probably implement this feature in the next version.

cprezzi commented 7 years ago

I have implemented server logfile in the new version (can be switched on in config.js).
Not perfect yet, but a good start.

donkjr commented 7 years ago

Nice and thanks for your consideration of this idea, it will help a a lot when troubleshooting ....

BTW ..... After a lot of hacking I got a batch to write to a file but you loose the console output. LW3start_Log.bat cd c:\laserweb3 start "LW Started with log file [LW3log] on Desktop" cmd /c "node server.js ^1> c:\Users\Owner\Desktop\LW3log.txt" start chrome http://localhost:8000/

Seems that when running from the START cmd the redirection is associated with the START command itself not the following command. The escape method "^" did not work for me...