Skip to content

Commit

Permalink
Adding a way to configure the logs path for Esent
Browse files Browse the repository at this point in the history
  • Loading branch information
ayende committed Jun 21, 2011
1 parent 42cd528 commit 2530ae8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Raven.Storage.Esent/TransactionalStorageConfigurator.cs
Expand Up @@ -7,6 +7,7 @@
using Microsoft.Isam.Esent.Interop;
using Raven.Database;
using Raven.Database.Config;
using Raven.Database.Extensions;

namespace Raven.Storage.Esent
{
Expand All @@ -24,15 +25,20 @@ public TransactionalStorageConfigurator(InMemoryRavenConfiguration configuration
public void ConfigureInstance(JET_INSTANCE jetInstance, string path)
{
path = Path.GetFullPath(path);
var logsPath = path;
if (string.IsNullOrEmpty(configuration.Settings["Raven/Esent/LogsPath"]) == false)
{
logsPath = configuration.Settings["Raven/Esent/LogsPath"].ToFullPath();
}
new InstanceParameters(jetInstance)
{
CircularLog = true,
Recovery = true,
NoInformationEvent = false,
CreatePathIfNotExist = true,
TempDirectory = Path.Combine(path, "temp"),
SystemDirectory = Path.Combine(path, "system"),
LogFileDirectory = Path.Combine(path, "logs"),
TempDirectory = Path.Combine(logsPath, "temp"),
SystemDirectory = Path.Combine(logsPath, "system"),
LogFileDirectory = Path.Combine(logsPath, "logs"),
MaxVerPages = TranslateToSizeInDatabasePages(GetValueFromConfiguration("Raven/Esent/MaxVerPages", 128)),
BaseName = "RVN",
EventSource = "Raven",
Expand Down

0 comments on commit 2530ae8

Please sign in to comment.