Skip to content

Commit

Permalink
Merge: branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
victorvogelpoel committed Jan 26, 2022
2 parents 7792cf6 + 3d8510f commit faf02c2
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Authors>Victor Vogelpoel</Authors>
<Company>Dramatic Development</Company>
<Copyright>Copyright (c) 2021 Dramatic Development - Victor Vogelpoel</Copyright>
<Copyright>Copyright (c) 2022 Dramatic Development - Victor Vogelpoel</Copyright>
<FileVersion>$([System.DateTime]::Now.ToString("yyyy.MM.dd.HHmm"))</FileVersion>
</PropertyGroup>
</Project>
Binary file not shown.
2 changes: 1 addition & 1 deletion samples/SampleVaultApplication/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Dramatic Development - Victor Vogelpoel")]
[assembly: AssemblyProduct("SampleVaultApplication")]
[assembly: AssemblyCopyright("Copyright © 2021 Dramatic Development - Victor Vogelpoel")]
[assembly: AssemblyCopyright("Copyright © 2022 Dramatic Development - Victor Vogelpoel")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[assembly:System.Reflection.AssemblyFileVersion("2021.10.24.2255")]
[assembly:System.Reflection.AssemblyFileVersion("2022.01.26.1141")]
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MFiles.VAF">
<Version>2.3.623.2</Version>
<Version>2.3.623.6</Version>
</PackageReference>
<PackageReference Include="MSBuildTasks">
<Version>1.5.0.235</Version>
Expand Down
15 changes: 10 additions & 5 deletions samples/SampleVaultApplication/VaultApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,27 @@ private void ConfigureLoggingLevelSwitch(string logLevel)
/// <summary>
/// Update the Serilog loggingLevelSwitch, when the LogLevel configuration for the Vault Application is changed in M-Files Admin.
/// </summary>
/// <param name="context"></param>
/// <param name="clientOps"></param>
/// <param name="oldConfiguration"></param>
/// <param name="oldConfiguration">old vaultapp configuration</param>
/// <param name="updateExternals"></param>
protected override void OnConfigurationUpdated(Configuration oldConfiguration, bool updateExternals)
{
if (oldConfiguration.LogLevel != Configuration.LogLevel)
{
ConfigureLoggingLevelSwitch(Configuration.LogLevel);

Log.Information("Log level changed to {LogLevel}", Configuration.LogLevel);
// Use separate logger to log the configuration level change, regardless of the old logging level.
var configLogger = new LoggerConfiguration()
.WriteTo.MFilesSysUtilsEventLogSink()
.WriteTo.MFilesSysUtilsEventLogSink(formatter: new RenderedCompactJsonFormatter ())
.CreateLogger();

configLogger.Information("Log level changed to {LogLevel} bij an administrator", Configuration.LogLevel);
}

base.OnConfigurationUpdated(oldConfiguration, updateExternals);
}



/// <summary>
/// Sample Event that fired upon checkin of a Builtin Document object type.
/// It logs the event using Serilog.
Expand Down
4 changes: 2 additions & 2 deletions samples/SampleVaultApplication/appdef.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<name>MFilesSysUtilsEventLog Sample sink SampleVaultApplication</name>
<description>Sample Vault Application for demonstrating Serilog logging using the Serilog.Sinks.MFilesSysUtilsEventLog</description>
<publisher>Dramatic Development</publisher>
<version>0.2</version>
<copyright>Copyright 2021 Dramatic Development</copyright>
<version>0.3</version>
<copyright>Copyright 2022 Dramatic Development</copyright>
<required-mfiles-version>20.5.0.0</required-mfiles-version>
<multi-server-compatible>false</multi-server-compatible>
<extension-objects>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<PackageProjectUrl>https://github.com/serilog-contrib/Serilog.Sinks.MFilesSysUtilsEventLog</PackageProjectUrl>
<RepositoryUrl>https://github.com/serilog-contrib/Serilog.Sinks.MFilesSysUtilsEventLog</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<AssemblyVersion>2.3.623.2</AssemblyVersion>
<PackageReleaseNotes>Updating reference to Vault Application Framework nuget version 2.3.623.2.
Aligning versioning to Vault Application Framework.</PackageReleaseNotes>
<Version>2.3.623.2</Version>
<AssemblyVersion>2.3.623.6</AssemblyVersion>
<PackageReleaseNotes>Updating reference to Vault Application Framework nuget version 2.3.623.6.</PackageReleaseNotes>
<Version>2.3.623.6</Version>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Serilog.Sinks.MFilesSysUtilsEventLog.snk</AssemblyOriginatorKeyFile>
<Copyright>Copyright (c) 2022 Dramatic Development - Victor Vogelpoel</Copyright>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net45|AnyCPU'">
Expand All @@ -29,7 +29,7 @@ Aligning versioning to Vault Application Framework.</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MFiles.VAF" Version="2.3.623.2" />
<PackageReference Include="MFiles.VAF" Version="2.3.623.6" />
<PackageReference Include="Serilog" Version="2.10.0" />
</ItemGroup>

Expand Down

0 comments on commit faf02c2

Please sign in to comment.