Modifier | Constructor and Description |
---|---|
protected |
LogBuilder(String event) |
Modifier and Type | Method and Description |
---|---|
Crunchlog.LogBuilder |
set(String key,
Object value)
Sets a given field and value in the log entry.
|
void |
submit()
Submits the constructed entry to the crunchlog.
|
Crunchlog.LogBuilder |
withScope()
Adds the id of the current scope to the log entry.
|
Crunchlog.LogBuilder |
withURI(WebContext ctx)
Adds the uri of the given request.
|
Crunchlog.LogBuilder |
withURIAndUserAgent(WebContext ctx)
Adds the uri and the user agent of the given request.
|
Crunchlog.LogBuilder |
withUser()
Adds the id of the current user and tenant to the log entry.
|
protected LogBuilder(String event)
@CheckReturnValue public Crunchlog.LogBuilder withUser()
@CheckReturnValue public Crunchlog.LogBuilder withScope()
@CheckReturnValue public Crunchlog.LogBuilder withURI(WebContext ctx)
ctx
- the request to log@CheckReturnValue public Crunchlog.LogBuilder withURIAndUserAgent(WebContext ctx)
ctx
- the request to log@CheckReturnValue public Crunchlog.LogBuilder set(String key, Object value)
key
- the key of the value to logvalue
- the value to logpublic void submit()
Copyright © 2018. All rights reserved.