Skip to content
Snippets Groups Projects

Product/1188 logging extended

Merged Marcel Nellesen requested to merge Product/1188-LoggingExtended into Sprint/2021-05
6 files
+ 189
35
Compare changes
  • Side-by-side
  • Inline

Files

+ 183
9
using Newtonsoft.Json.Linq;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Coscine.Logging
{
@@ -11,7 +7,8 @@ namespace Coscine.Logging
public class AnalyticsLogObject
{
private string _type = "";
public string Type {
public string Type
{
get
{
return _type;
@@ -31,7 +28,8 @@ namespace Coscine.Logging
private string _operation = "";
public string Operation {
public string Operation
{
get
{
return _operation;
@@ -176,6 +174,27 @@ namespace Coscine.Logging
}
}
private List<string> _quotaSize = new List<string>();
public List<string> QuotaSize
{
get
{
return _quotaSize;
}
set
{
if (value == null)
{
_quotaSize = new List<string>();
}
else
{
_quotaSize = value;
}
}
}
private string _resourceId = "";
public string ResourceId
@@ -218,6 +237,132 @@ namespace Coscine.Logging
}
}
private string _applicationsProfile = "";
public string ApplicationsProfile
{
get
{
return _applicationsProfile;
}
set
{
if (value == null)
{
_applicationsProfile = "";
}
else
{
_applicationsProfile = value;
}
}
}
private string _metadataCompleteness = "";
public string MetadataCompleteness
{
get
{
return _metadataCompleteness;
}
set
{
if (value == null)
{
_metadataCompleteness = "";
}
else
{
_metadataCompleteness = value;
}
}
}
private string _license = "";
public string License
{
get
{
return _license;
}
set
{
if (value == null)
{
_license = "";
}
else
{
_license = value;
}
}
}
private List<string> _disciplines = new List<string>();
public List<string> Disciplines
{
get
{
return _disciplines;
}
set
{
if (value == null)
{
_disciplines = new List<string>();
}
else
{
_disciplines = value;
}
}
}
private List<string> _organizations = new List<string>();
public List<string> Organizations
{
get
{
return _organizations;
}
set
{
if (value == null)
{
_organizations = new List<string>();
}
else
{
_organizations = value;
}
}
}
private string _visibility = "";
public string Visibility
{
get
{
return _visibility;
}
set
{
if (value == null)
{
_visibility = "";
}
else
{
_visibility = value;
}
}
}
private List<string> _projectList = new List<string>();
public List<string> ProjectList
@@ -281,7 +426,28 @@ namespace Coscine.Logging
}
}
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)
private string _externalInfo = "";
public string ExternalInfo
{
get
{
return _externalInfo;
}
set
{
if (value == null)
{
_externalInfo = "";
}
else
{
_externalInfo = value;
}
}
}
public AnalyticsLogObject(string type, string operation, DateTime timestamp, string userId, string roleId, string sessionId, string clientCorrolationId, string projectId, List<string> quotaSize, string resourceId, string fileId, string applicationsProfile, string metadataCompleteness, string license, List<string> disciplines, List<string> organizations, string visibility, List<string> projectList, List<string> resourceList, List<string> userList, string externalInfo)
{
Type = type;
Operation = operation;
@@ -291,11 +457,19 @@ namespace Coscine.Logging
SessionId = sessionId;
ClientCorrolationId = clientCorrolationId;
ProjectId = projectId;
QuotaSize = quotaSize;
ResourceId = resourceId;
FileId = fileId;
ApplicationsProfile = applicationsProfile;
MetadataCompleteness = metadataCompleteness;
License = license;
Disciplines = disciplines;
Organizations = organizations;
Visibility = visibility;
ProjectList = projectList;
ResourceList = resourceList;
UserList = userList;
ExternalInfo = externalInfo;
}
public AnalyticsLogObject()
@@ -304,7 +478,7 @@ namespace Coscine.Logging
private static string FormatTimestamp(DateTime timestamp)
{
string formattedDateTime = String.Format("{0:yyyy-MM-dd hh:mm:ss.fff}", timestamp);
string formattedDateTime = string.Format("{0:yyyy-MM-dd hh:mm:ss.fff}", timestamp);
return formattedDateTime;
}
}
Loading