|
1 | 1 | =============================================================================== |
2 | 2 | PROJECT EXPORT |
3 | | -Generated: Fri Mar 13 08:22:01 PM EDT 2026 |
| 3 | +Generated: Fri Mar 13 08:42:02 PM EDT 2026 |
4 | 4 | Project Path: /home/kushal/src/dotnet/MyBlog |
5 | 5 | =============================================================================== |
6 | 6 |
|
@@ -6973,8 +6973,8 @@ public sealed class UserRepository(BlogDbContext context) : IUserRepository |
6973 | 6973 |
|
6974 | 6974 | ================================================================================ |
6975 | 6975 | FILE: src/MyBlog.Infrastructure/ServiceCollectionExtensions.cs |
6976 | | -SIZE: 2.82 KB |
6977 | | -MODIFIED: 2026-03-13 20:18:34 |
| 6976 | +SIZE: 3.65 KB |
| 6977 | +MODIFIED: 2026-03-13 20:27:50 |
6978 | 6978 | ================================================================================ |
6979 | 6979 |
|
6980 | 6980 | using Microsoft.AspNetCore.Identity; |
@@ -7042,9 +7042,27 @@ public static class ServiceCollectionExtensions |
7042 | 7042 | // Cache Warmer - runs on startup to pre-fetch dimensions for existing images |
7043 | 7043 | services.AddHostedService<ImageCacheWarmerService>(); |
7044 | 7044 |
|
7045 | | - // Inside AddInfrastructure or similar registration method |
7046 | | - services.AddHostedService<FileLogExporter>(); |
7047 | | - services.AddHostedService<DatabaseLogExporter>(); |
| 7045 | + // Telemetry log exporters |
| 7046 | + // FileLogExporter requires a directory string in its constructor — |
| 7047 | + // use a factory so DI can construct it with the resolved path. |
| 7048 | + var enableFileLogging = configuration.GetValue("Telemetry:EnableFileLogging", true); |
| 7049 | + if (enableFileLogging) |
| 7050 | + { |
| 7051 | + var telemetryDir = TelemetryPathResolver.GetTelemetryDirectory(); |
| 7052 | + if (telemetryDir is not null) |
| 7053 | + { |
| 7054 | + var logsDir = Path.Combine(telemetryDir, "logs"); |
| 7055 | + services.AddSingleton<FileLogExporter>(sp => new FileLogExporter(logsDir)); |
| 7056 | + services.AddHostedService(sp => sp.GetRequiredService<FileLogExporter>()); |
| 7057 | + } |
| 7058 | + } |
| 7059 | + |
| 7060 | + var enableDbLogging = configuration.GetValue("Telemetry:EnableDatabaseLogging", true); |
| 7061 | + if (enableDbLogging) |
| 7062 | + { |
| 7063 | + services.AddSingleton<DatabaseLogExporter>(); |
| 7064 | + services.AddHostedService(sp => sp.GetRequiredService<DatabaseLogExporter>()); |
| 7065 | + } |
7048 | 7066 |
|
7049 | 7067 | return services; |
7050 | 7068 | } |
@@ -11879,13 +11897,18 @@ MODIFIED: 2026-01-26 05:44:15 |
11879 | 11897 |
|
11880 | 11898 | ================================================================================ |
11881 | 11899 | FILE: src/MyBlog.Web/Components/NotFound.razor |
11882 | | -SIZE: .14 KB |
11883 | | -MODIFIED: 2026-03-13 20:07:14 |
| 11900 | +SIZE: .27 KB |
| 11901 | +MODIFIED: 2026-03-13 20:38:54 |
11884 | 11902 | ================================================================================ |
11885 | 11903 |
|
| 11904 | +@page "/not-found" |
| 11905 | +@using MyBlog.Web.Components.Layout |
| 11906 | + |
11886 | 11907 | <LayoutView Layout="typeof(MainLayout)"> |
| 11908 | + <PageTitle>Page Not Found</PageTitle> |
11887 | 11909 | <h1>Page Not Found</h1> |
11888 | 11910 | <p>Sorry, the page you requested could not be found.</p> |
| 11911 | + <a href="/">← Back to Home</a> |
11889 | 11912 | </LayoutView> |
11890 | 11913 |
|
11891 | 11914 |
|
@@ -14886,7 +14909,7 @@ article { |
14886 | 14909 | ================================================================================ |
14887 | 14910 | FILE: src/MyBlog.Web/Components/Routes.razor |
14888 | 14911 | SIZE: .64 KB |
14889 | | -MODIFIED: 2026-03-13 20:07:14 |
| 14912 | +MODIFIED: 2026-03-13 20:39:03 |
14890 | 14913 | ================================================================================ |
14891 | 14914 |
|
14892 | 14915 | <Router AppAssembly="typeof(Program).Assembly" NotFoundPage="typeof(NotFound)"> |
@@ -17281,7 +17304,7 @@ function showShareError(shareBtn, message) { |
17281 | 17304 |
|
17282 | 17305 |
|
17283 | 17306 | =============================================================================== |
17284 | | -EXPORT COMPLETED: Fri Mar 13 08:22:02 PM EDT 2026 |
| 17307 | +EXPORT COMPLETED: Fri Mar 13 08:42:03 PM EDT 2026 |
17285 | 17308 | Total Files Found: 128 |
17286 | 17309 | Files Exported: 128 |
17287 | 17310 | Files Skipped: 0 (binary or large files) |
|
0 commit comments