mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Reduce scope stack.
This commit is contained in:
parent
23d2d0d008
commit
463691bfd2
@ -59,7 +59,11 @@ namespace Remotely.Server.Services
|
||||
{
|
||||
using var scope = _serviceProvider.CreateScope();
|
||||
var dataService = scope.ServiceProvider.GetRequiredService<IDataService>();
|
||||
dataService.WriteLog(logLevel, _categoryName, eventId, state.ToString(), exception, ScopeStack.ToList());
|
||||
var scopeStack = ScopeStack.Any() ?
|
||||
new string[] { ScopeStack.FirstOrDefault(), ScopeStack.LastOrDefault() } :
|
||||
Array.Empty<string>();
|
||||
|
||||
dataService.WriteLog(logLevel, _categoryName, eventId, state.ToString(), exception, scopeStack.ToList());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user