@@ -157,20 +157,45 @@ public override async Task AfterRecordingStopAsync(RecordingArgs e, Cancellation
157157
158158 if ( result . UsesMinimalPermissions )
159159 {
160- Logger . LogInformation (
161- "API {ApiName} is called with minimal permissions: {MinimalPermissions}" ,
162- result . ApiName ,
163- string . Join ( ", " , result . MinimalPermissions )
164- ) ;
160+ if ( string . IsNullOrWhiteSpace ( Configuration . SchemeName ) )
161+ {
162+ Logger . LogInformation (
163+ "API {ApiName} is called with minimal permissions: {MinimalPermissions}" ,
164+ result . ApiName ,
165+ string . Join ( ", " , result . MinimalPermissions )
166+ ) ;
167+ }
168+ else
169+ {
170+ Logger . LogInformation (
171+ "API {ApiName} is called with minimal permissions of '{SchemeName}' scheme: {MinimalPermissions}" ,
172+ result . ApiName ,
173+ Configuration . SchemeName ,
174+ string . Join ( ", " , result . MinimalPermissions )
175+ ) ;
176+ }
165177 }
166178 else
167179 {
168- Logger . LogWarning (
169- "Calling API {ApiName} with excessive permissions: {ExcessivePermissions}. Minimal permissions are: {MinimalPermissions}" ,
170- result . ApiName ,
171- string . Join ( ", " , result . ExcessivePermissions ) ,
172- string . Join ( ", " , result . MinimalPermissions )
173- ) ;
180+ if ( string . IsNullOrWhiteSpace ( Configuration . SchemeName ) )
181+ {
182+ Logger . LogWarning (
183+ "Calling API {ApiName} with excessive permissions: {ExcessivePermissions}. Minimal permissions are: {MinimalPermissions}" ,
184+ result . ApiName ,
185+ string . Join ( ", " , result . ExcessivePermissions ) ,
186+ string . Join ( ", " , result . MinimalPermissions )
187+ ) ;
188+ }
189+ else
190+ {
191+ Logger . LogWarning (
192+ "Calling API {ApiName} with excessive permissions of '{SchemeName}' scheme: {ExcessivePermissions}. Minimal permissions are: {MinimalPermissions}" ,
193+ result . ApiName ,
194+ Configuration . SchemeName ,
195+ string . Join ( ", " , result . ExcessivePermissions ) ,
196+ string . Join ( ", " , result . MinimalPermissions )
197+ ) ;
198+ }
174199 }
175200
176201 if ( unmatchedApiRequests . Any ( ) )
0 commit comments