java - How to wrap error trace inside Log.Severe() -
i using java.util.logging.logger
logging on app-engine. have errors call e.printstacktrace()
. except nothing when make call inside worker thread belongs task queue
. within task queue, loggings done log.info()
showing. question is: how wrap stack trace inside log.severe()
? following shows address instead of trace itself:
private static final logger log = logger.getlogger(luceneworker.class.getname()); //later inside method log.severe(e.getstacktrace().tostring());
logger#severe(msg)
convenience method logger#log(level.severe, msg)
use method instead.
log.log(level.severe, "your log message", e);
Comments
Post a Comment