mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-18 08:04:26 +01:00
Merge pull request #96 from rockstardev/blink-listener
More logging information in WaitInvoice method
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Product>Blink</Product>
|
<Product>Blink</Product>
|
||||||
<Description>Blink Lightning support</Description>
|
<Description>Blink Lightning support</Description>
|
||||||
<Version>1.0.11</Version>
|
<Version>1.0.12</Version>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
<RootNamespace>BTCPayServer.Plugins.Blink</RootNamespace>
|
<RootNamespace>BTCPayServer.Plugins.Blink</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -493,7 +493,28 @@ expiresIn = (int)createInvoiceRequest.Expiry.TotalMinutes
|
|||||||
return await res;
|
return await res;
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation("Stream disconnected, cannot await invoice. resultsz: "+ resultz);
|
// Enhanced logging to identify which task completed and its details
|
||||||
|
var taskType = resultz.GetType();
|
||||||
|
var typeName = taskType.Name.Contains('`') ? taskType.Name.Split('`')[0] : taskType.Name;
|
||||||
|
var genericArgs = taskType.GenericTypeArguments;
|
||||||
|
var genericTypeInfo = genericArgs.Length > 0
|
||||||
|
? $"<{string.Join(", ", genericArgs.Select(t => t.Name))}>"
|
||||||
|
: "";
|
||||||
|
|
||||||
|
_logger.LogInformation("WaitInvoice completed - Task Type: {TaskType}{GenericArgs}, " +
|
||||||
|
"Status: {Status}, IsCompletedSuccessfully: {IsCompletedSuccessfully}, " +
|
||||||
|
"IsFaulted: {IsFaulted}",
|
||||||
|
typeName,
|
||||||
|
genericTypeInfo,
|
||||||
|
resultz.Status,
|
||||||
|
resultz.IsCompletedSuccessfully,
|
||||||
|
resultz.IsFaulted);
|
||||||
|
|
||||||
|
if (resultz.IsFaulted && resultz.Exception != null)
|
||||||
|
{
|
||||||
|
_logger.LogError("Task completed with fault: {Exception}", resultz.Exception);
|
||||||
|
}
|
||||||
|
|
||||||
return new LightningInvoice { Id = Guid.NewGuid().ToString() }; // Return a dummy invoice so calling listening logic exits
|
return new LightningInvoice { Id = Guid.NewGuid().ToString() }; // Return a dummy invoice so calling listening logic exits
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user