LoginSignup
1
0

More than 1 year has passed since last update.

Javaのlogging

Posted at

it depends on! situation

java.util.logging

java 1.4から提供しているlogging utility
7 levelのloggingを提供している

  • SEVERE(highest value)
  • WARNING
  • INFO
  • CONFIG
  • FINE
  • FINER
  • FINEST(lowest value)
private static final Logger logger = Logger.getLogger(MyApplication.class.getName());

logger.info(Level.INFO, "it is test for {0}","log");

長所:外部ライブラリー使用せず、使える

短所:What means "FINE"? "FINER"? "FINEST"?

log4j

  • thread safe?
  • performance に最適化
  • ALL, TRACE, DEBUG, INFO, WARN, ERROR and FATAL
private static Logger logger = LogManager.getLogger(MyApplication.class);
logger.info(Level.INFO, "it is test for {0}","log");

Slf4j(Simple Logging Facade For Java)

現在PRJで使っているログ
ファサード? フランス語で。。?外観?

REF

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0