ClientLogEventDto.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System;
  2. using System.ComponentModel.DataAnnotations;
  3. using Microsoft.Extensions.Logging;
  4. namespace Jellyfin.Api.Models.ClientLogDtos
  5. {
  6. /// <summary>
  7. /// The client log dto.
  8. /// </summary>
  9. public class ClientLogEventDto
  10. {
  11. /// <summary>
  12. /// Gets or sets the event timestamp.
  13. /// </summary>
  14. [Required]
  15. public DateTime Timestamp { get; set; }
  16. /// <summary>
  17. /// Gets or sets the log level.
  18. /// </summary>
  19. [Required]
  20. public LogLevel Level { get; set; }
  21. /// <summary>
  22. /// Gets or sets the user id.
  23. /// </summary>
  24. public Guid? UserId { get; set; }
  25. /// <summary>
  26. /// Gets or sets the client name.
  27. /// </summary>
  28. [Required]
  29. public string ClientName { get; set; } = string.Empty;
  30. /// <summary>
  31. /// Gets or sets the client version.
  32. /// </summary>
  33. [Required]
  34. public string ClientVersion { get; set; } = string.Empty;
  35. ///
  36. /// <summary>
  37. /// Gets or sets the device id.
  38. /// </summary>
  39. [Required]
  40. public string DeviceId { get; set; } = string.Empty;
  41. /// <summary>
  42. /// Gets or sets the log message.
  43. /// </summary>
  44. [Required]
  45. public string Message { get; set; } = string.Empty;
  46. }
  47. }