Class LogContext.Snapshot

java.lang.Object
io.karatelabs.output.LogContext.Snapshot
Enclosing class:
LogContext

public static final class LogContext.Snapshot extends Object
Snapshot of the report-buffer threshold, the log mask/pretty settings and — only if something changes them while it is live — the per-category Logback levels. Take one before a scenario runs and restore() after, so any mid-test configure logging = {...} change does not leak across scenarios.

A level change made by another thread is deliberately not reverted by this one: the levels are process-global, and clobbering them with a value this thread never saw would be worse than leaving the other thread's setting alone.

  • Method Details

    • restore

      public void restore()