Logs now show date time rather than x hours ago (#169)
This commit is contained in:
@@ -457,18 +457,25 @@ namespace gaseous_server.Classes.Metadata
|
|||||||
|
|
||||||
private static void CacheClean()
|
private static void CacheClean()
|
||||||
{
|
{
|
||||||
if (ObjectCache == null)
|
try
|
||||||
|
{
|
||||||
|
if (ObjectCache == null)
|
||||||
|
{
|
||||||
|
ObjectCache = new Dictionary<string, MemoryCacheObject>();
|
||||||
|
}
|
||||||
|
Dictionary<string, MemoryCacheObject> workCache = ObjectCache;
|
||||||
|
foreach (KeyValuePair<string, MemoryCacheObject> objectCache in workCache)
|
||||||
|
{
|
||||||
|
if (objectCache.Value.ExpiryTime < DateTime.UtcNow)
|
||||||
|
{
|
||||||
|
ObjectCache.Remove(objectCache.Key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
{
|
{
|
||||||
ObjectCache = new Dictionary<string, MemoryCacheObject>();
|
ObjectCache = new Dictionary<string, MemoryCacheObject>();
|
||||||
}
|
}
|
||||||
Dictionary<string, MemoryCacheObject> workCache = ObjectCache;
|
|
||||||
foreach (KeyValuePair<string, MemoryCacheObject> objectCache in workCache)
|
|
||||||
{
|
|
||||||
if (objectCache.Value.ExpiryTime < DateTime.UtcNow)
|
|
||||||
{
|
|
||||||
ObjectCache.Remove(objectCache.Key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class MemoryCacheObject
|
private class MemoryCacheObject
|
||||||
|
@@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
var newRow = [
|
var newRow = [
|
||||||
//result[i].id,
|
//result[i].id,
|
||||||
moment(result[i].eventTime).fromNow(),
|
moment(result[i].eventTime).format("YYYY-MM-DD H:mm:ss"),
|
||||||
result[i].eventType,
|
result[i].eventType,
|
||||||
result[i].process,
|
result[i].process,
|
||||||
result[i].message
|
result[i].message
|
||||||
|
Reference in New Issue
Block a user