Skip to content

Commit 6c53404

Browse files
committed
Keep logging behavior default as it, only create client logs with LogMode.Information
1 parent 7482a6d commit 6c53404

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/ServiceControl.RavenDB/EmbeddedDatabase.cs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,19 @@ public static EmbeddedDatabase Start(EmbeddedDatabaseConfiguration databaseConfi
5353

5454
var nugetPackagesPath = Path.Combine(databaseConfiguration.DbPath, "Packages", "NuGet");
5555

56-
LoggingSource.Instance.SetupLogMode(
57-
(LogMode)255,
58-
Path.Combine(databaseConfiguration.LogPath, "Raven.Embedded"),
59-
retentionTime: TimeSpan.FromDays(14),
60-
retentionSize: 1024 * 1024 * 10,
61-
compress: false
62-
);
63-
64-
LoggingSource.Instance.EnableConsoleLogging();
56+
var logMode = Enum.Parse<LogMode>(databaseConfiguration.LogsMode);
57+
58+
if (logMode == LogMode.Information) // Most verbose
59+
{
60+
LoggingSource.Instance.EnableConsoleLogging();
61+
LoggingSource.Instance.SetupLogMode(
62+
logMode,
63+
Path.Combine(databaseConfiguration.LogPath, "Raven.Embedded"),
64+
retentionTime: TimeSpan.FromDays(14),
65+
retentionSize: 1024 * 1024 * 10,
66+
compress: false
67+
);
68+
}
6569

6670
Logger.InfoFormat("Loading RavenDB license from {0}", licenseFileNameAndServerDirectory.LicenseFileName);
6771
var serverOptions = new ServerOptions

0 commit comments

Comments
 (0)