Netflix / blitz4j

Logging framework for fast asynchronous logging
Apache License 2.0
563 stars 117 forks source link

Address deadlock when attempting to avoid stack creation. #24

Closed jhspaybar closed 6 years ago

jhspaybar commented 6 years ago

Walking the tree eagerly could lead to deadlocks when logging happened from multiple threads because the order of appender walking was unstable. Instead, we will avoid generating a stack for LocationInfo until after the NFPatternParser has notified the LoggingContext that the logger should generate location information. It is important to note that the first log lines will not have valid LocationInfo, but will in subsequent lines.