1

I've started to make tests, and all the output is sent to a ".log" file. In one test, I have to stop manually the application in a certain line of log.

The question is: Can a .log file work like a Console, displaying info in real time?

maazza
  • 7,016
  • 15
  • 63
  • 96
FMGordillo
  • 81
  • 5
  • Add ConsoleAppender to your log4j configuration: http://www.mkyong.com/logging/log4j-log4j-properties-examples/ – Xupypr MV Mar 07 '16 at 13:40

1 Answers1

0

You can monitor a log file with tail -f https://en.wikipedia.org/wiki/Tail_%28Unix%29

Within your java code you can monitor its output see java runtime.getruntime() getting output from executing a command line program

or create your own appender How to create a own Appender in log4j?

Community
  • 1
  • 1
maazza
  • 7,016
  • 15
  • 63
  • 96