implement the DefaultLogger by following the Logger interface
DefaultLogger's constructor should support below way to set output to buffer. it can also support printing to console if buf is not set.
var buf bytes.Buffer
defaultLogger.SetOutput(&buf)
LogEntry.IsActive can be used to filter not useful events (SetEventTypes)
OnBeforeEvent will set entry.StartTime, then in OnAfterEvent(), Duration can be calculated.
SetLogCallback can set user-provided function as callback for the log.
user-provided function callback will be called at the end of OnAfterEvent.
no Go test is needed to add
new go file's apache header is year 2026