diff --git a/src/Squidex/Config/Logging.cs b/src/Squidex/Config/Logging.cs new file mode 100644 index 000000000..9fa6e3b05 --- /dev/null +++ b/src/Squidex/Config/Logging.cs @@ -0,0 +1,33 @@ +// ========================================================================== +// Squidex Headless CMS +// ========================================================================== +// Copyright (c) Squidex UG (haftungsbeschraenkt) +// All rights reserved. Licensed under the MIT license. +// ========================================================================== + +using System; +using Microsoft.Extensions.Logging; + +namespace Squidex.Config +{ + public static class Logging + { + public static void AddOrleansFilter(this ILoggingBuilder builder) + { + builder.AddFilter((category, level) => + { + if (category.StartsWith("Orleans.", StringComparison.OrdinalIgnoreCase)) + { + return level >= LogLevel.Warning; + } + + if (category.StartsWith("Runtime.", StringComparison.OrdinalIgnoreCase)) + { + return level >= LogLevel.Warning; + } + + return level >= LogLevel.Information; + }); + } + } +} diff --git a/src/Squidex/Config/Orleans/SiloWrapper.cs b/src/Squidex/Config/Orleans/SiloWrapper.cs index df0694ad9..7b0ab2d3c 100644 --- a/src/Squidex/Config/Orleans/SiloWrapper.cs +++ b/src/Squidex/Config/Orleans/SiloWrapper.cs @@ -75,7 +75,7 @@ namespace Squidex.Config.Orleans { builder.AddConfiguration(hostingContext.Configuration.GetSection("logging")); builder.AddSemanticLog(); - builder.AddFilter((category, level) => !category.StartsWith("Orleans.", StringComparison.CurrentCultureIgnoreCase) || level >= LogLevel.Warning); + builder.AddOrleansFilter(); }) .ConfigureApplicationParts(builder => { diff --git a/src/Squidex/Pipeline/ApiModelValidationAttribute.cs b/src/Squidex/Pipeline/ApiModelValidationAttribute.cs index 65f88df61..3c96afe51 100644 --- a/src/Squidex/Pipeline/ApiModelValidationAttribute.cs +++ b/src/Squidex/Pipeline/ApiModelValidationAttribute.cs @@ -38,7 +38,10 @@ namespace Squidex.Pipeline } } - throw new ValidationException("The model is not valid.", errors); + if (errors.Count > 0) + { + throw new ValidationException("The model is not valid.", errors); + } } } } diff --git a/src/Squidex/Program.cs b/src/Squidex/Program.cs index 49c6de70c..9983b5694 100644 --- a/src/Squidex/Program.cs +++ b/src/Squidex/Program.cs @@ -12,6 +12,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Orleans; using Orleans.Hosting; +using Squidex.Config; using Squidex.Infrastructure.Log.Adapter; namespace Squidex @@ -29,7 +30,7 @@ namespace Squidex { builder.AddConfiguration(hostingContext.Configuration.GetSection("logging")); builder.AddSemanticLog(); - builder.AddFilter((category, level) => !category.StartsWith("Orleans.", StringComparison.CurrentCultureIgnoreCase) || level >= LogLevel.Warning); + builder.AddOrleansFilter(); }) .ConfigureAppConfiguration((hostContext, builder) => { diff --git a/src/Squidex/app/features/content/pages/content/content-history.component.html b/src/Squidex/app/features/content/pages/content/content-history.component.html index cfd678f5e..f9026f3dc 100644 --- a/src/Squidex/app/features/content/pages/content/content-history.component.html +++ b/src/Squidex/app/features/content/pages/content/content-history.component.html @@ -14,7 +14,7 @@
Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown - aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan - helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu - banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan - aliquip quis cardigan american apparel, butcher voluptate nisi qui.
-Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. - Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan - four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft - beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda - labore aesthetic magna delectus mollit.
-Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic - lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork - tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. - DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. -
-Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold - out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland - seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh - DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. -
-