Skip to content

Commit ca0f0b7

Browse files
committed
Merge branch 'master' into Vs2017
2 parents 81f3209 + 33577ad commit ca0f0b7

File tree

6 files changed

+47
-37
lines changed

6 files changed

+47
-37
lines changed

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@ NLog.Targets.Fluents is a custom target of [NLog](https://github.com/nlog/NLog)
66
Settings
77
--------
88

9-
Setting | Description | Example
10-
--------------------------- | ----------------------------------------------------------- | --------------
11-
Host | Host name of the fluentd node | example.local
12-
Port | Port number of the fluentd node | 24224
13-
Tag | Fluentd tag name | windowshost
14-
NoDelay | Enable Nagle's algorithm | true
15-
SendBufferSize | Send buffer size | 8192
16-
SendTimeout | Send timeout | 2
17-
LingerEnabled | Wait for all the data to be sent when closing the connection | false
18-
LingerTime | Linger timeout | 2
19-
EmitStackTraceWhenAvailable | Emit a stacktrace for every log entry when available | false
20-
IncludeAllProperties | Include structured logging parameters for every log entry | false
9+
Setting | Description | Example
10+
--------------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------
11+
Host | Host name of the fluentd node | example.local
12+
Port | Port number of the fluentd node | 24224
13+
Tag | Fluentd tag name | windowshost
14+
NoDelay | Enable Nagle's algorithm | true
15+
SendBufferSize | Send buffer size | 8192
16+
SendTimeout | Send timeout | 2
17+
LingerEnabled | Wait for all the data to be sent when closing the connection | false
18+
LingerTime | Linger timeout | 2
19+
EmitStackTraceWhenAvailable | Emit a stacktrace for every log entry when available | false
20+
IncludeAllProperties | Include structured logging parameters for every log entry | false
21+
ExcludeProperties | Comma separated string with names which properties to exclude. Only used when IncludeAllProperties is *true*. | property1,property2
2122

2223

2324
License

src/Demo/App.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
55
</startup>
6-
</configuration>
6+
</configuration>

src/Demo/Demo.csproj

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>Demo</RootNamespace>
1111
<AssemblyName>Demo</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -32,11 +33,16 @@
3233
<WarningLevel>4</WarningLevel>
3334
</PropertyGroup>
3435
<ItemGroup>
35-
<Reference Include="NLog">
36-
<HintPath>..\packages\NLog.4.5.0\lib\net45\NLog.dll</HintPath>
36+
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
37+
<HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
3738
</Reference>
3839
<Reference Include="System" />
40+
<Reference Include="System.Configuration" />
3941
<Reference Include="System.Core" />
42+
<Reference Include="System.IO.Compression" />
43+
<Reference Include="System.Runtime.Serialization" />
44+
<Reference Include="System.ServiceModel" />
45+
<Reference Include="System.Transactions" />
4046
<Reference Include="System.Xml.Linq" />
4147
<Reference Include="System.Data.DataSetExtensions" />
4248
<Reference Include="Microsoft.CSharp" />

src/Demo/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="NLog" version="4.5.0" targetFramework="net45" />
3+
<package id="NLog" version="4.7.0" targetFramework="net48" />
44
</packages>

src/NLog.Targets.Fluentd/Fluentd.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ public class Fluentd : NLog.Targets.TargetWithLayout
207207

208208
public bool IncludeAllProperties { get; set; }
209209

210+
public ISet<string> ExcludeProperties { get; set; }
211+
210212
private TcpClient client;
211213

212214
private Stream stream;
@@ -319,6 +321,9 @@ protected override void Write(LogEventInfo logEvent)
319321
if (string.IsNullOrEmpty(propertyKey))
320322
continue;
321323

324+
if (ExcludeProperties.Contains(propertyKey))
325+
continue;
326+
322327
record[propertyKey] = SerializePropertyValue(propertyKey, property.Value);
323328
}
324329
}
@@ -369,6 +374,7 @@ public Fluentd()
369374
this.LingerTime = 1000;
370375
this.EmitStackTraceWhenAvailable = false;
371376
this.Tag = "${processname}";
377+
this.ExcludeProperties = new HashSet<string>();
372378
}
373379
}
374380
}
Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net35;net40;net45;netstandard2.0</TargetFrameworks>
5-
<DisableImplicitFrameworkReferences Condition=" '$(TargetFramework)' != 'netstandard2.0' ">true</DisableImplicitFrameworkReferences>
4+
<TargetFramework>netstandard2.0</TargetFramework>
65

76
<Description>NLog Target that emits the log entries to a fluentd node</Description>
8-
<Authors>Moriyoshi Koizumi</Authors>
7+
<Authors>Moriyoshi Koizumi, Jarred Capellman</Authors>
98
<CurrentYear>$([System.DateTime]::Now.ToString(yyyy))</CurrentYear>
10-
<Copyright>Copyright (c) $(CurrentYear) - Moriyoshi Koizumi</Copyright>
9+
<Copyright>Copyright (c) 2020 - Moriyoshi Koizumi and Jarred Capellman</Copyright>
10+
11+
<Version>1.0.6.0</Version>
1112

12-
<Version>1.0.5.0</Version>
13-
1413
<PackageTags>NLog;fluentd;log;logging</PackageTags>
1514
<PackageIconUrl>http://nlog-project.org/N.png</PackageIconUrl>
16-
<PackageProjectUrl>https://github.com/fluent/NLog.Targets.Fluentd</PackageProjectUrl>
15+
<PackageProjectUrl>https://github.com/jcapellman/NLog.Targets.Fluentd</PackageProjectUrl>
1716
<PackageLicenseUrl>https://raw.githubusercontent.com/fluent/NLog.Targets.Fluentd/master/LICENSE.txt</PackageLicenseUrl>
1817
<RepositoryType>git</RepositoryType>
19-
<RepositoryUrl>git://github.com/fluent/NLog.Targets.Fluentd</RepositoryUrl>
18+
<RepositoryUrl>git://github.com/jcapellman/NLog.Targets.Fluentd</RepositoryUrl>
19+
<PackageReleaseNotes>Add exclude properties property</PackageReleaseNotes>
20+
<PackageId>NLog.Targets.Fluentd.NetStandard</PackageId>
21+
<Product>NLog.Targets.Fluentd.NetStandard</Product>
22+
<Company>Moriyoshi Koizumi, Jarred Capellman</Company>
2023
</PropertyGroup>
2124

2225
<ItemGroup>
23-
<PackageReference Include="NLog" Version="4.5.0" />
24-
<PackageReference Include="MsgPack.Cli" Version="0.9.2" />
25-
</ItemGroup>
26-
27-
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' ">
28-
<Reference Include="System" />
29-
<Reference Include="System.Core" />
26+
<PackageReference Include="MsgPack.Cli" Version="1.0.1" />
27+
<PackageReference Include="NLog" Version="4.7.0" />
3028
</ItemGroup>
31-
32-
</Project>
29+
</Project>

0 commit comments

Comments
 (0)