Skip to main content

Operations: Server: How to Get Logs Configuration

To get the server logs configuration, use GetLogsConfigurationOperation from Maintenance.Server

Syntax

public GetLogsConfigurationOperation()

Return Value

The result of executing GetLogsConfigurationOperation is a GetLogsConfigurationResult object:

public class GetLogsConfigurationResult
{
public LogMode CurrentMode { get; set; }

public LogMode Mode { get; set; }

public string Path { get; set; }

public bool UseUtcTime { get; set; }
}
PropertyDescription
CurrentModeCurrent mode that is active
ModeMode that is written in the configuration file and which will be used after a server restart
PathPath to which logs will be written
UseUtcTimeIndicates if logs will be written in UTC or in server local time

Example

GetLogsConfigurationResult logsConfiguration = store
.Maintenance
.Server
.Send(new GetLogsConfigurationOperation());