Skip to content
Snippets Groups Projects
Commit 0a1b36d2 authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

Refactoring

parent d26d126e
No related branches found
No related tags found
2 merge requests!10Product/639-readableLogs,!6Topic/671 readable logs
......@@ -11,6 +11,6 @@ using System.Reflection;
[assembly: AssemblyProduct("Logging.Tests")]
[assembly: AssemblyVersion("1.1.0")]
[assembly: AssemblyFileVersion("1.1.0")]
[assembly: AssemblyInformationalVersion("1.1.0-topic-671-readab0008")]
[assembly: AssemblyInformationalVersion("1.1.0-topic-671-readab0009")]
[assembly: AssemblyCopyright("2020 IT Center, RWTH Aachen University")]
......@@ -14,7 +14,8 @@ namespace Coscine.Logging
public string Operation { get; set; }
public DateTime Timestamp { get; set; }
// Default is the current time
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
public string UserId { get; set; }
......@@ -30,13 +31,13 @@ namespace Coscine.Logging
public string FileId { get; set; }
public JArray ProjectList { get; set; }
public List<string> ProjectList { get; set; }
public JArray ResourceList { get; set; }
public List<string> ResourceList { get; set; }
public JArray UserList { get; set; }
public List<string> UserList { get; set; }
public AnalyticsLogObject (string type, string operation, DateTime timestamp, string userId, string roleId, string sessionId, string clientCorrolationId, string projectId, string resourceId, string fileId, JArray projectList, JArray resourceList, JArray userList)
public AnalyticsLogObject (string type, string operation, DateTime timestamp, string userId, string roleId, string sessionId, string clientCorrolationId, string projectId, string resourceId, string fileId, List<string> projectList, List<string> resourceList, List<string> userList)
{
Type = type;
Operation = operation;
......
......
......@@ -33,7 +33,7 @@ namespace Coscine.Logging
private const string LogLevelKeyReporting = "coscine/global/logging/levels/reporting";
private static bool[] activeLoglevels = new bool[Enum.GetNames(typeof(LogType)).Length];
private static readonly bool[] activeLoglevels = new bool[Enum.GetNames(typeof(LogType)).Length];
public static bool IsLogLevelActivated(LogType logType)
{
......
......
......@@ -11,6 +11,6 @@ using System.Reflection;
[assembly: AssemblyProduct("Logging")]
[assembly: AssemblyVersion("1.1.0")]
[assembly: AssemblyFileVersion("1.1.0")]
[assembly: AssemblyInformationalVersion("1.1.0-topic-671-readab0008")]
[assembly: AssemblyInformationalVersion("1.1.0-topic-671-readab0009")]
[assembly: AssemblyCopyright("2020 IT Center, RWTH Aachen University")]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment