This repository was archived by the owner on Sep 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ namespace SqlStreamStore.HAL.Index
33 using System ;
44 using System . Reflection ;
55 using Halcyon . HAL ;
6+ using Newtonsoft . Json ;
67 using Newtonsoft . Json . Linq ;
78
89 internal class IndexResource : IResource
@@ -29,8 +30,8 @@ public IndexResource(IStreamStore streamStore)
2930 private static string GetVersion ( Type type )
3031 => type . Assembly
3132 . GetCustomAttribute < AssemblyInformationalVersionAttribute > ( )
32- ? . InformationalVersion ??
33- type . Assembly
33+ ? . InformationalVersion
34+ ?? type . Assembly
3435 . GetCustomAttribute < AssemblyVersionAttribute > ( )
3536 ? . Version
3637 ?? "unknown" ;
@@ -42,5 +43,7 @@ private static string GetVersion(Type type)
4243 . Index ( ) . Self ( )
4344 . Find ( )
4445 . Add ( Constants . Relations . Feed , Constants . Streams . All ) ) ) ;
46+
47+ public override string ToString ( ) => _data . ToString ( Formatting . None ) ;
4548 }
4649}
Original file line number Diff line number Diff line change 1212 using SqlStreamStore . HAL . AllStreamMessage ;
1313 using SqlStreamStore . HAL . Docs ;
1414 using SqlStreamStore . HAL . Index ;
15+ using SqlStreamStore . HAL . Logging ;
1516 using SqlStreamStore . HAL . StreamMessage ;
1617 using SqlStreamStore . HAL . StreamMetadata ;
1718 using SqlStreamStore . HAL . Streams ;
2324
2425 public static class SqlStreamStoreHalMiddleware
2526 {
27+ private static ILog s_Log = LogProvider . GetLogger ( typeof ( SqlStreamStoreHalMiddleware ) ) ;
28+
2629 private static MidFunc CaseSensitiveQueryStrings => ( context , next ) =>
2730 {
2831 if ( context . Request . QueryString != QueryString . Empty )
@@ -81,6 +84,8 @@ public static IApplicationBuilder UseSqlStreamStoreHal(
8184 var streamMetadata = new StreamMetadataResource ( streamStore ) ;
8285 var streamMessages = new StreamMessageResource ( streamStore ) ;
8386
87+ s_Log . Info ( index . ToString ) ;
88+
8489 return builder
8590 . UseExceptionHandling ( )
8691 . Use ( CaseSensitiveQueryStrings )
You can’t perform that action at this time.
0 commit comments