public final class LogAttribute<T> extends Pair<String,T> implements JsonWriteable, org.slf4j.Marker
Modifier and Type | Field and Description |
---|---|
static String |
ID_ATTR_NAME |
static String |
PROFILE_SAMPLES_ATTR_NAME |
Constructor and Description |
---|
LogAttribute(String first,
T second) |
asMap, equals, from, getFirst, getKey, getSecond, getValue, hashCode, setValue, toList, writeTo
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
writeJsonTo, writeTo
comparingByKey, comparingByKey, comparingByValue, comparingByValue
public static final String ID_ATTR_NAME
public static final String PROFILE_SAMPLES_ATTR_NAME
public String getName()
getName
in interface org.slf4j.Marker
public static <T> LogAttribute<T> of(String val, T obj)
public static LogAttribute<CharSequence> traceId(CharSequence id)
public static LogAttribute<StackSamples> profileSamples(StackSamples ss)
public static LogAttribute<Level> origLevel(Level level)
public static LogAttribute<Level> origLoggerName(String loggerName)
public static LogAttribute<Level> origTimeStamp(Instant instant)
public static LogAttribute<Level> origTimeStamp(long millisSinceEpoch)
public static LogAttribute<Slf4jLogRecord> log(Slf4jLogRecord record)
public static LogAttribute<Long> execTimeMicros(long time, TimeUnit tu)
public static LogAttribute<Long> value(String what, long value)
public String toString()
Pair
public void writeJsonTo(Appendable appendable) throws IOException
writeJsonTo
in interface JsonWriteable
IOException
public void writeJsonTo(com.fasterxml.jackson.core.JsonGenerator gen) throws IOException
IOException
public static LogAttribute<Object> fromJson(CharSequence jsonStr)
public static LogAttribute<Object> fromMap(Map<String,Object> val)
public void add(org.slf4j.Marker reference)
add
in interface org.slf4j.Marker
public boolean remove(org.slf4j.Marker reference)
remove
in interface org.slf4j.Marker
public boolean hasChildren()
hasChildren
in interface org.slf4j.Marker
public boolean hasReferences()
hasReferences
in interface org.slf4j.Marker
public Iterator<org.slf4j.Marker> iterator()
iterator
in interface org.slf4j.Marker
public boolean contains(org.slf4j.Marker other)
contains
in interface org.slf4j.Marker
public boolean contains(String name)
contains
in interface org.slf4j.Marker
Copyright © 2021 SPF4J. All rights reserved.