Skip to content

Commit c712b5f

Browse files
author
Edward Meng
committed
Add StoragePath to AspNetCore configuration parse to use FolderObjectStorage.
1 parent 8cc0489 commit c712b5f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Platforms/Exceptionless.AspNetCore/ExceptionlessExtensions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Exceptionless.Models;
88
using Exceptionless.Models.Data;
99
using Exceptionless.Plugins.Default;
10+
using Exceptionless.Storage;
1011
using Microsoft.AspNetCore.Hosting;
1112
using Microsoft.Extensions.Configuration;
1213
using Microsoft.Extensions.DependencyInjection;
@@ -78,6 +79,10 @@ public static void ReadFromConfiguration(this ExceptionlessConfiguration config,
7879
if (!String.IsNullOrEmpty(serverUrl))
7980
config.ServerUrl = serverUrl;
8081

82+
string storagePath = section["StoragePath"];
83+
if (!String.IsNullOrEmpty(storagePath))
84+
config.Resolver.Register(typeof(IObjectStorage), () => new FolderObjectStorage(config.Resolver, storagePath));
85+
8186
foreach (var setting in section.GetSection("Settings").GetChildren())
8287
if (setting.Value != null)
8388
config.Settings[setting.Key] = setting.Value;

0 commit comments

Comments
 (0)