Permalink
Browse files

Adding a way to configure the logs path for Esent

  • Loading branch information...
1 parent 42cd528 commit 2530ae8e1058179dcbc4cdeb75a4d6a6637224c2 @ayende ayende committed Jun 21, 2011
Showing with 9 additions and 3 deletions.
  1. +9 −3 Raven.Storage.Esent/TransactionalStorageConfigurator.cs
@@ -7,6 +7,7 @@
using Microsoft.Isam.Esent.Interop;
using Raven.Database;
using Raven.Database.Config;
+using Raven.Database.Extensions;
namespace Raven.Storage.Esent
{
@@ -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",

0 comments on commit 2530ae8

Please sign in to comment.