Please initialize the log4j system properly. While running web service

后端 未结 7 953
半阙折子戏
半阙折子戏 2020-12-04 17:05

Maybe it looks silly to ask this but I am confused. I referred to Configuring Log4j property but it doesn\'t seem to help.

I have written a simple web service HelloW

7条回答
  •  萌比男神i
    2020-12-04 17:16

    If the below statment is present in your class then your log4j.properties should be in java source(src) folder , if it is jar executable it should be packed in jar not a seperate file.

    static Logger log = Logger.getLogger(MyClass.class);
    

    Thanks,

提交回复
热议问题