How link log from Logback in Swing application?

后端 未结 2 844
执念已碎
执念已碎 2020-12-03 20:22

I have to add a panel to an application, this panel will log the errors of the application. I have create a class wich extends AppenderBase and i have configure the xml fil

2条回答
  •  离开以前
    2020-12-03 20:45

    For this you have to write your custom Appender, for this see :logback.qos.ch/manual/appenders.html. Then you need to using a component such as JTextArea for showing log in it. Then you have to write a Programmatic Configuration logback for relation between your custom Appender and your Swing-Component. see :logback.qos.ch/manual/joran.html

提交回复
热议问题