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; }
}

| ------------- |----- | | CurrentMode | Current mode that is active | | Mode | Mode that is written in the configuration file and which will be used after a server restart | | Path | Path to which logs will be written | | UseUtcTime | Indicates if logs will be written in UTC or in server local time |

Example

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