HobbyProject/Source Code/TeamHobby.HobbyProjectGenerator.Logging/LogEntry.cs
colincreasman 4f2f4c8fce Revised Logging LLD
Fixed entry point and added LogEntry class
2021-12-13 11:36:10 -08:00

31 lines
749 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TeamHobby.HobbyProjectGenerator.Logging
{
public enum LogLevel
{
Info, Debug, Warning, Error
}
public enum LogCategory
{
View, Business, Server, Data, Datastore
}
// LogEntry is a record type with init properties for each field
// ensures that log entries are immutable after initialization
public record LogEntry
{
public LogLevel level { get; init; }
public LogCategory category { get; init; }
public string user { get; init; }
public string description { get; init; }
public DateTime timestamp { get; init; }
}
}