Updates to Core.Configuration Models to use DefaultValue attribute to allow auto generated JSONSchema to give a default value in schema
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// See LICENSE for more details.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Umbraco.Cms.Core.Configuration.Models
|
||||
{
|
||||
@@ -11,9 +12,12 @@ namespace Umbraco.Cms.Core.Configuration.Models
|
||||
[UmbracoOptions(Constants.Configuration.ConfigLogging)]
|
||||
public class LoggingSettings
|
||||
{
|
||||
internal const string StaticMaxLogAge = "1.00:00:00"; // TimeSpan.FromHours(24);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value for the maximum age of a log file.
|
||||
/// </summary>
|
||||
public TimeSpan MaxLogAge { get; set; } = TimeSpan.FromHours(24);
|
||||
[DefaultValue(StaticMaxLogAge)]
|
||||
public TimeSpan MaxLogAge { get; set; } = TimeSpan.Parse(StaticMaxLogAge);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user