@@ -50,6 +50,8 @@ public bool DebugLoggingEnabled
5050 private const int sourcePathWidth = 60 ;
5151 private const int remoteStorageIdWidth = 20 ;
5252
53+ private const int indent = - 30 ;
54+
5355 /// <summary>
5456 /// Creates instance of this class.
5557 /// </summary>
@@ -88,24 +90,24 @@ private string ConfigureLogger()
8890 public void PrintEnvironmentDescription ( )
8991 {
9092 // Log environment description.
91- log . Info ( $ "\n { "AppID:" , - 25 } { appId } ") ;
92- log . Info ( $ "\n { "Engine version:" , - 25 } { typeof ( IEngine ) . Assembly . GetName ( ) . Version } ") ;
93- log . Info ( $ "\n { "OS version:" , - 25 } { RuntimeInformation . OSDescription } ") ;
94- log . Info ( $ "\n { ".NET version:" , - 25 } { RuntimeInformation . FrameworkDescription } { IntPtr . Size * 8 } bit.") ;
95- log . Info ( $ "\n { "Package or app identity:" , - 25 } { PackageRegistrar . IsRunningWithIdentity ( ) } ") ;
96- log . Info ( $ "\n { "Sparse package identity:" , - 25 } { PackageRegistrar . IsRunningWithSparsePackageIdentity ( ) } ") ;
97- log . Info ( $ "\n { "Elevated mode:" , - 25 } { new System . Security . Principal . WindowsPrincipal ( System . Security . Principal . WindowsIdentity . GetCurrent ( ) ) . IsInRole ( System . Security . Principal . WindowsBuiltInRole . Administrator ) } ") ;
93+ log . Info ( $ "\n { "AppID:" , indent } { appId } ") ;
94+ log . Info ( $ "\n { "Engine version:" , indent } { typeof ( IEngine ) . Assembly . GetName ( ) . Version } ") ;
95+ log . Info ( $ "\n { "OS version:" , indent } { RuntimeInformation . OSDescription } ") ;
96+ log . Info ( $ "\n { ".NET version:" , indent } { RuntimeInformation . FrameworkDescription } { IntPtr . Size * 8 } bit.") ;
97+ log . Info ( $ "\n { "Package or app identity:" , indent } { PackageRegistrar . IsRunningWithIdentity ( ) } ") ;
98+ log . Info ( $ "\n { "Sparse package identity:" , indent } { PackageRegistrar . IsRunningWithSparsePackageIdentity ( ) } ") ;
99+ log . Info ( $ "\n { "Elevated mode:" , indent } { new System . Security . Principal . WindowsPrincipal ( System . Security . Principal . WindowsIdentity . GetCurrent ( ) ) . IsInRole ( System . Security . Principal . WindowsBuiltInRole . Administrator ) } ") ;
98100
99101 string sparsePackagePath = PackageRegistrar . GetSparsePackagePath ( ) ;
100102 if ( File . Exists ( sparsePackagePath ) )
101103 {
102- log . Info ( $ "\n { "Sparse package location:" , - 25 } { sparsePackagePath } ") ;
104+ log . Info ( $ "\n { "Sparse package location:" , indent } { sparsePackagePath } ") ;
103105 var cert = System . Security . Cryptography . X509Certificates . X509Certificate . CreateFromSignedFile ( sparsePackagePath ) ;
104- log . Info ( $ "\n { "Sparse package cert:" , - 25 } Subject: { cert . Subject } , Issued by: { cert . Issuer } ") ;
106+ log . Info ( $ "\n { "Sparse package cert:" , indent } Subject: { cert . Subject } , Issued by: { cert . Issuer } ") ;
105107 }
106108 else
107109 {
108- log . Info ( $ "\n { "Sparse package:" , - 25 } Not found") ;
110+ log . Info ( $ "\n { "Sparse package:" , indent } Not found") ;
109111 }
110112 }
111113
@@ -126,11 +128,12 @@ public async Task PrintEngineStartInfoAsync(EngineWindows engine)
126128 public async Task PrintEngineDescriptionAsync ( EngineWindows engine )
127129 {
128130 log . Info ( $ "\n ") ;
129- log . Info ( $ "\n { "File system root:" , - 25 } { engine . Path } ") ;
130- log . Info ( $ "\n { "Remote storage root:" , - 25 } { remoteStorageRootPath } ") ;
131- log . Info ( $ "\n { "AutoLock:" , - 25 } { engine . AutoLock } ") ;
132- log . Info ( $ "\n { "Outgoing sync, ms:" , - 25 } { engine . SyncService . SyncIntervalMs } ") ;
133-
131+ log . Info ( $ "\n { "File system root:" , indent } { engine . Path } ") ;
132+ log . Info ( $ "\n { "Remote storage root:" , indent } { remoteStorageRootPath } ") ;
133+ log . Info ( $ "\n { "AutoLock:" , indent } { engine . AutoLock } ") ;
134+ log . Info ( $ "\n { "Outgoing sync, ms:" , indent } { engine . SyncService . SyncIntervalMs } ") ;
135+ log . Info ( $ "\n { "Shell extensions RPC enabled:" , indent } { engine . ShellExtensionsComServerRpcEnabled } ") ;
136+ log . Info ( $ "\n { "Max Transfer concurrent requests:" , indent } { engine . MaxTransferConcurrentRequests } ") ;
134137
135138 // Log indexing state. Sync root must be indexed.
136139 await PrintIndexingStateAsync ( engine . Path ) ;
@@ -143,7 +146,7 @@ public async Task PrintEngineDescriptionAsync(EngineWindows engine)
143146 private async Task PrintIndexingStateAsync ( string path )
144147 {
145148 StorageFolder userFileSystemRootFolder = await StorageFolder . GetFolderFromPathAsync ( path ) ;
146- log . Info ( $ "\n { "Indexed state:" , - 25 } { await userFileSystemRootFolder . GetIndexedStateAsync ( ) } ") ;
149+ log . Info ( $ "\n { "Indexed state:" , indent } { await userFileSystemRootFolder . GetIndexedStateAsync ( ) } ") ;
147150 }
148151
149152 public void LogMessage ( string message )
0 commit comments