Operations: Server: How to Get Logs Configuration

To set the server logs configuration, use SetLogsConfigurationOperation from Maintenance.Server. The server logs configuration is not persisted and will get back to the original value after server restart.

Syntax

public SetLogsConfigurationOperation(Parameters parameters)

public class Parameters
{
    public LogMode Mode { get; set; }
}
Parameters
Mode LogMode Logging mode (level) to be set

Example

store
    .Maintenance
    .Server
    .Send(new SetLogsConfigurationOperation(
        new SetLogsConfigurationOperation.Parameters
        {
            Mode = LogMode.Information
        }));
await store
    .Maintenance
    .Server
    .SendAsync(new SetLogsConfigurationOperation(
        new SetLogsConfigurationOperation.Parameters
        {
            Mode = LogMode.Information
        }));