Class DateLookup
- java.lang.Object
-
- org.apache.logging.log4j.core.lookup.DateLookup
-
- All Implemented Interfaces:
StrLookup
@Plugin(name="date", category="Lookup") public class DateLookup extends Object implements StrLookup
Formats the current date or the date in the LogEvent. The "key" is used as the format String, following the java.text.SimpleDateFormat date and time pattern strings.
-
-
Constructor Summary
Constructors Constructor Description DateLookup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
lookup(String key)
Looks up the current date.String
lookup(LogEvent event, String key)
Looks up the the current date or the date in the LogEvent.
-