@@ -114,20 +114,45 @@ public override async Task AfterRecordingStopAsync(RecordingArgs e, Cancellation
114114
115115 if ( result . UsesMinimalPermissions )
116116 {
117- Logger . LogInformation (
118- "API {ApiName} is called with minimal permissions: {MinimalPermissions}" ,
119- result . ApiName ,
120- string . Join ( ", " , result . MinimalPermissions )
121- ) ;
117+ if ( string . IsNullOrWhiteSpace ( Configuration . SchemeName ) )
118+ {
119+ Logger . LogInformation (
120+ "API {ApiName} is called with minimal permissions: {MinimalPermissions}" ,
121+ result . ApiName ,
122+ string . Join ( ", " , result . MinimalPermissions )
123+ ) ;
124+ }
125+ else
126+ {
127+ Logger . LogInformation (
128+ "API {ApiName} is called with minimal permissions of '{SchemeName}' scheme: {MinimalPermissions}" ,
129+ result . ApiName ,
130+ Configuration . SchemeName ,
131+ string . Join ( ", " , result . MinimalPermissions )
132+ ) ;
133+ }
122134 }
123135 else
124136 {
125- Logger . LogWarning (
126- "Calling API {ApiName} with excessive permissions: {ExcessivePermissions}. Minimal permissions are: {MinimalPermissions}" ,
127- result . ApiName ,
128- string . Join ( ", " , result . ExcessivePermissions ) ,
129- string . Join ( ", " , result . MinimalPermissions )
130- ) ;
137+ if ( string . IsNullOrWhiteSpace ( Configuration . SchemeName ) )
138+ {
139+ Logger . LogWarning (
140+ "Calling API {ApiName} with excessive permissions: {ExcessivePermissions}. Minimal permissions are: {MinimalPermissions}" ,
141+ result . ApiName ,
142+ string . Join ( ", " , result . ExcessivePermissions ) ,
143+ string . Join ( ", " , result . MinimalPermissions )
144+ ) ;
145+ }
146+ else
147+ {
148+ Logger . LogWarning (
149+ "Calling API {ApiName} with excessive permissions of '{SchemeName}' scheme: {ExcessivePermissions}. Minimal permissions are: {MinimalPermissions}" ,
150+ result . ApiName ,
151+ Configuration . SchemeName ,
152+ string . Join ( ", " , result . ExcessivePermissions ) ,
153+ string . Join ( ", " , result . MinimalPermissions )
154+ ) ;
155+ }
131156 }
132157
133158 if ( unmatchedApiRequests . Any ( ) )
0 commit comments