문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
java:log4j [2012/12/05 12:12] kwon37xi [비동기 로깅] |
java:log4j [2022/01/13 13:53] (현재) kwon37xi |
||
---|---|---|---|
줄 1: | 줄 1: | ||
====== Log4j ====== | ====== Log4j ====== | ||
* http:// | * http:// | ||
+ | * [[java: | ||
* [[http:// | * [[http:// | ||
* [[java: | * [[java: | ||
* [[java: | * [[java: | ||
* [[java: | * [[java: | ||
+ | * [[java: | ||
+ | * [[java: | ||
+ | * [[java: | ||
+ | * [[java: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
* [[https:// | * [[https:// | ||
+ | |||
+ | ===== reload4j ===== | ||
+ | * [[https:// | ||
+ | |||
===== additivity ===== | ===== additivity ===== | ||
* 중복으로 로그가 쌓인다면, | * 중복으로 로그가 쌓인다면, | ||
- | ===== 비동기 | + | ===== Appender별 |
- | * [[http://ricardozuasti.com/2009/asynchronous-logging-with-log4j/|Asynchronous logging with log4j]] | + | * [[http://logging.apache.org/log4j/ |
- | * [[http:// | + | log4j.appender.[AppenderName].Threshold=[로그레벨] |
- | * [[http:// | + | </ |
- | * convertion pattern에서 '' | + | * [[http:// |
- | * ''< | + | <appender name="[AppenderName]" |
- | + | .... | |
- | <code xml> | + | <filter |
- | <?xml version="1.0" | + | <param name="LevelMin" value=" |
- | < | + | <param name="LevelMax" value=" |
- | < | + | </filter> |
- | < | + | </ |
- | <layout | + | </ |
- | <param name="ConversionPattern" value=" | + | |
- | </layout> | + | |
- | | + | |
- | < | + | |
- | | + | |
- | <appender-ref ref=" | + | |
- | </ | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | * 주의 할 점들 | + | |
- | * If you see duplicated entries on your log, make sure your logger has the additivity attribute set to false. | + | |
- | * The BufferSize parameter of the AsyncAppender defines the number of entries that will be stored in memory to let the actual appender catch up flushing them to their final destination. If this buffer fills up, the logging will switch to a synchronous mode until buffer space becomes available, potentially becoming a performance issue. Make sure this buffer is big enough, taking into account the IO speed and number of log entries generated by your application. | + | |
- | * You can add the Blocking parameter to the AsyncAppender definition in your config file, if you set it to false (the default value is true) when the buffer fills up, the appender will discard log events until new buffer space becomes available. This can be unacceptable in applications where logging information is critical, but on the other hand can be very desirable where performance is a critical factor. | + |