system.out.println redirection in java

前端 未结 3 583
时光取名叫无心
时光取名叫无心 2021-01-26 11:28

I want to catch the println and redirect to a file and print it

here is my code, I wish to print 123 /n 456

but that doesn\'t work and I think I need something t

3条回答
  •  终归单人心
    2021-01-26 11:52

    Redirect System.out.println to Log4J, while keeping class name information

    the above post explains how to do this to some extent.

提交回复
热议问题