??????????????????????
????????????????η????????BUG???????????????????????????????????費?????????????????磬??????BUG????????????????????????????????????Щ???????????з???Щ????
??????????????????????????κ????????????????????????????????????????????????????????????????????????Щ??????????????ο??????????????
????public String printDocument(Document doc?? Mode mode) {
????log.debug("Entering printDocument(doc={}?? mode={})"?? doc?? mode);
????String id = ...; //Lengthy printing operation
????log.debug("Leaving printDocument(): {}"?? id);
????return id;
????}
???????????????????????????????????????????????????Ч?????????????????????????????????????????????——????迴???“Entering”????????????”Leaving“?????????????????????????????????????????????????顣????????????????????????????????????????Щ????????????????????????????????AOP????????ɡ?????????????????????????????????С???????????????????????????????
?????????????????????DEBUG??TRACE????????????????????? ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????ò??????????????????????????????????????κ????????????????????????????????????????????????????????????????????????????
???????????
???????????????????Щ???????????????????????????ü???????????????????????????????????????£????????????ü??????(?????2????????????????????????????????????????????????????????????Apache CXF??SOAP??HTTP?????????????????η????Ч??
??????????????????????????????????????????????????????????????????????????????????????????????????м???????????????С???????????????????????????????????????????????ESB??????????????????????????????????ò??????????ο???Mule?????????????
????????????????????????????????????????????????????????棬??????κ??????????e????ж??????????????????????????????????????????????????????????????????????С?????
????Collection<Integer> requestIds = //...
????if(log.isDebugEnabled())
????log.debug("Processing ids: {}"?? requestIds);
????else
????log.info("Processing ids size: {}"?? requestIds.size());
??????????logger?????ó?DEBUG????????????????????ID??????????????ó?????INFO????????????????????С?????????????????????isInfoEnabled??????????μ??????ɡ???????????????????ID?????????null????????DEBUG?£????NULL????????????????????ó?INFO??????????????????????4??????????????e??
?????????????
??????????????????????????????????????????????????????????????????????????RMI??EJB????????????л????????????????????? ??API?е??????????????????????????NoClassDefFoundError?????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????null??0?????????????????????????????????е??????????????????????????????????????
????log.error("IO exception"?? e);
????throw new CustomException(e);
????????д????????????????Σ??????????MyCustomException???????????????Ρ????????????????????????????????????????????????????????????
?????????????????????????????Щ???????????API??????????????????????????????????????????С?????????????????????????????????????
try {
Integer x = null;
++x;
} catch (Exception e) {
log.error(e); //A
log.error(e?? e); //B
log.error("" + e); //C
log.error(e.toString()); //D
log.error(e.getMessage()); //E
log.error(null?? e); //F
log.error(""?? e); //G
log.error("{}"?? e); //H
log.error("{}"?? e.getMessage()); //I
log.error("Error reading configuration file: " + e); //J
log.error("Error reading configuration file: " + e.getMessage()); //K
log.error("Error reading configuration file"?? e); //L
}
??????????????G??L???????????????A??B??slf4j????????????????????????????????????????????????????????????磬E??????????????????????????????κ?????????????????????? .????????????????????????????????????????????????????????д??????????????????????????????????????檔?????????????????????e??????????????????????С?
?????????????????????????
???????????????????????????????????????????????????????????????????????м??????????????????д??shell??????????????????????????????????????????????????????????????????

????????????????????顣??????????????????????????
??????????棬??????????С????????GB????????????????κ???λ?????????????????????????????????????grep??sed??awk??Щ?????????????????п?????????????????????????????????????? ????????????????????Щ????????????????????????????????????????????????????
????log.debug("Request TTL set to: {} ({})"?? new Date(ttl)?? ttl);
????// Request TTL set to: Wed Apr 28 20:14:12 CEST 2010 (1272478452437)
????final String duration = DurationFormatUtils.formatDurationWords(durationMillis?? true?? true);
????log.info("Importing took: {}ms ({})"?? durationMillis?? duration);
????//Importing took: 123456789ms (1 day 10 hours 17 minutes 36 seconds)
?????????????”ms after 1970 epoch“???????????????л???????????????????”1??10С?17??36??“???????????
?????????????????д?????????????????????????????