0

I am logging messages via log 4 j logger and I want to somehow get this stream of data and display it in a JTextArea for display. Is there any easy way to do this?

thanks you

asgs
  • 3,828
  • 6
  • 39
  • 53
user565660
  • 1,151
  • 3
  • 19
  • 36
  • 2
    you may want to write your own/custom appender, have a look at this [question](http://stackoverflow.com/questions/6072389/how-to-create-a-own-appender-in-log4j) – A4L Mar 20 '13 at 18:31

2 Answers2

0

Never tried it myself, but most straight-forward way would be to implement org.apache.log4j.Appender, so your implementation's constructor would accept instance of GUI object where you want to show log entries.

Victor Sorokin
  • 11,695
  • 1
  • 33
  • 49
0

Check it out here for solution and suggestion as well jtextarea-as-listener-for-log4j-logger . I hope it's helpful.

Community
  • 1
  • 1
Khanh Tran
  • 447
  • 6
  • 21