how to print an exception using logger?

前端 未结 4 2131
无人共我
无人共我 2021-02-18 15:15

I have a situation in which I want to print all the exception caught in catch block using logger.

 try {
        File file = new File(\"C:\\\\className\").mkdir(         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-18 15:41

    Try to log the stack trace like below:

    logger.error("Exception :: " , e);
    

提交回复
热议问题