这可能是一个愚蠢的问题,但我有点失去与Java Logger
private static Logger logger = Logger.getLogger("order.web.OrderManager");
logger.info("Removed order " + id + ".");
我在哪里可以看到日志?另外这个引用来自java.util.logging.Logger库:
On each logging call the Logger initially performs a cheap check of the request level (e.g. SEVERE or FINE) against the effective log level of the logger. If the request level is lower than the log level, the logging call returns immediately.
After passing this initial (cheap) test, the Logger will allocate a LogRecord to describe the logging message. It will then call a Filter (if present) to do a more detailed check on whether the record should be published. If that passes it will then publish the LogRecord to its output Handlers.`
这是否意味着如果我有3个请求级别日志:
logger.log(Level.FINE, "Something");
logger.log(Level.WARNING, "Something");
logger.log(Level.SEVERE, "Something");
我的日志级别是SEVERE,我可以看到所有三个日志,如果我的日志级别是WARNING,那么我看不到SEVERE日志,是正确的吗?我如何设置日志级别?