This commit is contained in:
2020-07-29 21:01:26 +00:00
parent b7028b7d02
commit b30a911351
4 changed files with 12 additions and 12 deletions

View File

@@ -42,7 +42,7 @@ namespace AyaNova.Biz
//optional user id to send directly to them
internal static async Task AddGeneralNotifyEvent(NotifyEventType eventType, string message, string name, Exception except = null, long userId = 0)
{
log.LogTrace($"AddGeneralNotifyEvent processing: [type:{eventType}, userId:{userId}, message:{message}]");
log.LogDebug($"AddGeneralNotifyEvent processing: [type:{eventType}, userId:{userId}, message:{message}]");
#if (DEBUG)
switch (eventType)
{
@@ -134,7 +134,7 @@ namespace AyaNova.Biz
//will iterate the subscriptions and see if any apply here
internal static async Task HandlePotentialNotificationEvent(AyaEvent ayaEvent, ICoreBizObjectModel newObject, ICoreBizObjectModel originalObject = null)
{
log.LogTrace($"HandlePotentialNotificationEvent processing: [AyaType:{newObject.AyaType}, AyaEvent:{ayaEvent}]");
log.LogDebug($"HandlePotentialNotificationEvent processing: [AyaType:{newObject.AyaType}, AyaEvent:{ayaEvent}]");
//set to true if any changes are made to the context (NotifyEvent added)
bool SaveContext = false;
try
@@ -175,7 +175,7 @@ namespace AyaNova.Biz
Name = newObject.Name
};
await ct.NotifyEvent.AddAsync(n);
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
//Note: in same event but for MODIFY below if need to delete old notifyevent here
// var deleteEventList = await ct.NotifyEvent.Where(z => z.ObjectId == ev.ObjectId && z.AyaType == ev.AyaType).ToListAsync();
@@ -241,7 +241,7 @@ namespace AyaNova.Biz
Name = newObject.Name
};
await ct.NotifyEvent.AddAsync(n);
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
SaveContext = true;
}
}
@@ -265,7 +265,7 @@ namespace AyaNova.Biz
Name = newObject.Name
};
await ct.NotifyEvent.AddAsync(n);
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
SaveContext = true;
}
}
@@ -307,7 +307,7 @@ namespace AyaNova.Biz
// Name=newObject.Name
// };
// await ct.NotifyEvent.AddAsync(n);
// log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
// log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
// //Note: in same event but for MODIFY below if need to delete old notifyevent here
// // var deleteEventList = await ct.NotifyEvent.Where(z => z.ObjectId == ev.ObjectId && z.AyaType == ev.AyaType).ToListAsync();
@@ -412,7 +412,7 @@ namespace AyaNova.Biz
Name = newObject.Name
};
await ct.NotifyEvent.AddAsync(n);
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
SaveContext = true;
}
}
@@ -455,7 +455,7 @@ namespace AyaNova.Biz
Name = newObject.Name
};
await ct.NotifyEvent.AddAsync(n);
log.LogTrace($"Adding NotifyEvent: [{n.ToString()}]");
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
SaveContext = true;
}
}
@@ -481,7 +481,7 @@ namespace AyaNova.Biz
}
finally
{
log.LogTrace($"Notify event processing completed");
log.LogDebug($"Notify event processing completed");
}

View File

@@ -32,7 +32,7 @@ namespace AyaNova.Biz
log.LogTrace("Checking if backup should run");
if (!ServerGlobalOpsSettingsCache.Backup.Active)
{
log.LogTrace("Automatic backup is set to INACTIVE - not backing up");
log.LogDebug("Automatic backup is set to INACTIVE - not backing up");
return;
}

View File

@@ -78,7 +78,7 @@ namespace AyaNova.Biz
}
if (ret != "notfound")
{
//I'm thinking do not log internally failed except as trace event as this would fill up log file
//I'm thinking do not log internally failed except as debug event as this would fill up log file
//instead if they have a license issue they can do manual fetch and then that will log so they can see error
//(also it will return an error to the client)
log.LogDebug($"FetchLicense - failed: {ret}");

View File

@@ -107,7 +107,7 @@ namespace AyaNova.Biz
//All items have an event date, for non time delayed events it's just the moment it was created
//which will predate this moment now if it's pre-existing
var events = await ct.NotifyEvent.Include(z => z.NotifySubscription).ToListAsync();
log.LogTrace($"Found {events.Count} NotifyEvents to examine for potential delivery");
log.LogDebug($"Found {events.Count} NotifyEvents to examine for potential delivery");
//cache translations
//Get all subscription unique userId's that aren't inapp deliveries