1

Currently, I am using the following code to trigger a jar file and write the logs. It writes the logs in a file but doesn't show the execution on the console window.

>>"D:\Debug\logfile.log" java -jar Q3587.jar

Please, suggest what changes I can see the logs on console as well. I cannot use Log4j.

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • 1
    On Windows you could use Powershell `get-content logfile.log -Wait` a somewhat "tail -f" - equivalent. If you have git-bash or cygwin you can actually use tail -f – Fildor Jul 14 '16 at 11:58
  • 1
    http://stackoverflow.com/a/10719322/1683264 – rojo Jul 14 '16 at 12:08
  • 1
    you can run both command at the same time like this: `>>"logfile.log" java -jar Q3587.jar & get-content logfile.log -Wait` – Hossein Nasr Jul 14 '16 at 12:10
  • 2
    Possible duplicate of [Using a custom Tee command for .bat file](http://stackoverflow.com/questions/10711839/using-a-custom-tee-command-for-bat-file) – aschipfl Jul 14 '16 at 12:59

0 Answers0