The list of logging methods of AtataContextBuilder:

public AtataContextBuilder<TLogConsumer>

AddLogConsumer<TLogConsumer>(TLogConsumer consumer)

where TLogConsumer : ILogConsumer

Adds the log consumer.

public AtataContextBuilder<ILogConsumer>

AddLogConsumer(string typeNameOrAlias)

Adds the log consumer. typeNameOrAlias can accept full type name, custom ILogConsumer alias (registered via LogConsumerAliases.Register method) or one of the predefined aliases: “debug”, “trace”, “nunit” and “nlog”.

public AtataContextBuilder<TraceLogConsumer>

AddTraceLogging()

Adds the TraceLogConsumer instance that uses System.Diagnostics.Trace class for logging.

public AtataContextBuilder<DebugLogConsumer>

AddDebugLogging()

Adds the DebugLogConsumer instance that uses System.Diagnostics.Debug class for logging.

public AtataContextBuilder<NUnitTestContextLogConsumer>

AddNUnitTestContextLogging()

Adds the NUnitTestContextLogConsumer instance that uses NUnit.Framework.TestContext class for logging.

public AtataContextBuilder<NLogConsumer>

AddNLogLogging(string loggerName = null)

Adds the NLogConsumer instance that uses NLog.Logger class for logging.

Logging Configuration

The list of extension methods to configure ILogConsumer:

public AtataContextBuilder<TTLogConsumer>

WithoutSectionFinish<TTLogConsumer>()

Defines that the logging should not use section-like pair messages (not “Starting: {action}” and “Finished: {action} {time elapsed}”, but just “{action}”).

public AtataContextBuilder<TTLogConsumer>

WithMinLevel<TTLogConsumer>(LogLevel level)

Specifies the minimum level of the log event to write to the log. The default value is Trace.

Usage

AtataContext.Configure().
    UseChrome().
    UseNUnitTestContextLogging().
        WithoutSectionFinish().
        WithMinLevel(LogLevel.Info).
    UseDebugLogging().
        WithMinLevel(LogLevel.Debug).
    Build();