-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I am combining 2 small enhancement requests here:
- Modify the return types where possible on LogEntry to return a reference to itself and allow method chaining.
- Accept a second parameter (overloaded method) on the LogEntry.stoptimer() method to allow the flush to happen instantly: LogEntry(String timerName, boolean flush).
The results would look similar to the following (my code is in groovy):
BEFORE
private def processEvent(def event)
{
LogEntry logEntry = new LogEntry();
logEntry.startTimer("processEvent");
logEntry.addField("event", event);
Thread.sleep(10000);
logEntry.stopTimer("processEvent");
logEntry.flush();
}
AFTER
private def processEvent(def event)
{
LogEntry logEntry = new LogEntry().addField("event", event).startTimer("processEvent");
Thread.sleep(10000);
logEntry.stopTimer("processEvent", true);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels