mirror of
https://github.com/bitwarden/server
synced 2025-12-18 09:13:19 +00:00
admin logs
This commit is contained in:
28
src/Admin/Models/LogModel.cs
Normal file
28
src/Admin/Models/LogModel.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using Microsoft.Azure.Documents;
|
||||
using Newtonsoft.Json;
|
||||
using Serilog.Events;
|
||||
|
||||
namespace Bit.Admin.Models
|
||||
{
|
||||
public class LogModel : Resource
|
||||
{
|
||||
public long EventIdHash { get; set; }
|
||||
public LogEventLevel Level { get; set; }
|
||||
public string Message { get; set; }
|
||||
public string MessageTruncated => Message.Length > 200 ? $"{Message.Substring(0, 200)}..." : Message;
|
||||
public string MessageTemplate { get; set; }
|
||||
public Error Exception { get; set; }
|
||||
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class Error : Exception, ISerializable
|
||||
{
|
||||
[JsonProperty(PropertyName = "error")]
|
||||
public string ErrorMessage { get; set; }
|
||||
|
||||
[JsonConstructor]
|
||||
public Error() { }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user