java logger 日志文件_java.util.logging.Logger在哪里存储他们的日志

这可能是一个愚蠢的问题,但我有点失去与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日志,是正确的吗?我如何设置日志级别?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值