You are currently browsing legacy 5.0 version of documentation. Click here to switch to the newest 5.1 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Operations: Server: How to Get Logs Configuration

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


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


GetLogsConfigurationResult logsConfiguration = store
    .Send(new GetLogsConfigurationOperation());
GetLogsConfigurationResult logsConfiguration = await store
    .SendAsync(new GetLogsConfigurationOperation());