This commit is contained in:
2021-01-15 20:47:32 +00:00
parent 64b6e8aa74
commit 8fa01c9638
3 changed files with 10 additions and 8 deletions

View File

@@ -13,9 +13,6 @@ namespace AyaNova.PickList
internal static async Task<List<NameIdActiveItem>> GetResponseAsync(IAyaPickList PickList, string autoCompleteQuery,
string tagSpecificQuery, bool includeInactive, long[] preIds, string variant, AyContext ct, ILogger log)
{
//This may be called internally in *Biz classes who don't have a log of their own
if (log == null)
log = AyaNova.Util.ApplicationLogging.CreateLogger("PickListFetcher");
//Sort out effective Template
string Template = null;
@@ -72,6 +69,9 @@ namespace AyaNova.PickList
catch (Npgsql.PostgresException e)
{
//log out the exception and the query
//This may be called internally in *Biz classes who don't have a log of their own
if (log == null)
log = AyaNova.Util.ApplicationLogging.CreateLogger("PickListFetcher");
log.LogInformation("PickList query failed unexpectedly. Query was:");
log.LogInformation(q);
log.LogInformation(e, "DB Exception");