public interface JsonLogger
| Modifier and Type | Method and Description |
|---|---|
JsonLogger |
exception(String key,
Exception exception)
Add an exception to the JSON hierarchy.
|
JsonLogger |
field(String key,
Object value)
Add a top level field.
|
JsonLogger |
field(String key,
java.util.function.Supplier value)
Add a top level field as a lambda or supplier that is lazily evaluated only if the message is logged.
|
JsonLogger |
json(String key,
com.google.gson.JsonElement jsonElement)
Add an arbitrary JsonElement object to the top level with the given key.
|
JsonLogger |
json(String key,
java.util.function.Supplier<com.google.gson.JsonElement> jsonElement)
Add an arbitrary JsonElement object to the top level with the given key that is lazily evaluated only if the message is logged
|
JsonLogger |
list(String key,
List list)
Add a list to the JSON hierarchy
|
JsonLogger |
list(String key,
java.util.function.Supplier<List> list)
Add a list to the JSON hierarchy as a lambda or supplier that is lazily evaluated only if the message is logged
|
void |
log()
Log the formatted message
|
JsonLogger |
map(String key,
Map map)
Add a map to the JSON hierarchy
|
JsonLogger |
map(String key,
java.util.function.Supplier<Map> map)
Add a map to the JSON hierarchy as a lambda or supplier that is lazily evaluated only if the message is logged
|
JsonLogger |
message(String message)
Set top level message field.
|
JsonLogger |
message(java.util.function.Supplier<String> message)
Set top level message field as a lambda or supplier that is lazily evaluated only if the message is logged
|
JsonLogger |
stack()
Include the stack dump of the current running thread in the log output.
|
JsonLogger message(String message)
JsonLogger message(java.util.function.Supplier<String> message)
JsonLogger map(String key, Map map)
JsonLogger map(String key, java.util.function.Supplier<Map> map)
JsonLogger list(String key, List list)
JsonLogger list(String key, java.util.function.Supplier<List> list)
JsonLogger field(String key, Object value)
JsonLogger field(String key, java.util.function.Supplier value)
JsonLogger json(String key, com.google.gson.JsonElement jsonElement)
JsonLogger json(String key, java.util.function.Supplier<com.google.gson.JsonElement> jsonElement)
JsonLogger exception(String key, Exception exception)
JsonLogger stack()
void log()
Copyright © 2016 Savoir Technologies, Inc.. All Rights Reserved.