Skip to content

Commit

Permalink
Bump SonarAnalyzer.CSharp from 7.16.0.8981 to 8.0.0.9566 (#96)
Browse files Browse the repository at this point in the history
Bumps SonarAnalyzer.CSharp from 7.16.0.8981 to 8.0.0.9566.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
  • Loading branch information
dependabot-preview[bot] authored and dustinchilson committed Nov 12, 2019
1 parent 7e7ccc1 commit 53e02d2
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 93 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
run: nuget push ./artifacts/NLog.Targets.GraylogHttp.${{ env.GIT_VERSION }}.nupkg -ApiKey ${{ secrets.NUGET_ORG_API_KEY }} -Source https://api.nuget.org/v3/index.json

- name: Create Release
if: steps.extract_branch.outputs.branch == 'master'
id: create_release
uses: actions/create-release@master
env:
Expand All @@ -47,9 +48,10 @@ jobs:
tag_name: v${{ env.GIT_VERSION }}
release_name: Release v${{ env.GIT_VERSION }}
draft: false
prerelease: steps.extract_branch.outputs.branch != 'master'
prerelease: false

- name: Upload Test Results
if: steps.extract_branch.outputs.branch == 'master'
id: upload-test-results
uses: actions/upload-release-asset@master
env:
Expand All @@ -61,6 +63,7 @@ jobs:
asset_content_type: application/xml

- name: Upload Nuget Package
if: steps.extract_branch.outputs.branch == 'master'
id: upload-nuget-package
uses: actions/upload-release-asset@master
env:
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.7" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="7.16.0.8981" PrivateAssets="all" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.0.0.9566" PrivateAssets="all" />
</ItemGroup>

</Project>
2 changes: 0 additions & 2 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ continuous-delivery-fallback-tag: ''

mode: ContinuousDeployment

branches: {}

ignore:
sha: []
22 changes: 9 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
# NLog.Targets.GraylogHttp
# NLog.Targets.GraylogHttp
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d4e1107092654f41a7a513fc8954308e)](https://app.codacy.com/app/dustinchilson/NLog.Targets.GraylogHttp?utm_source=github.com&utm_medium=referral&utm_content=dustinchilson/NLog.Targets.GraylogHttp&utm_campaign=Badge_Grade_Dashboard)
[![Apache 2.0 licensed](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/dustinchilson/NLog.Targets.GraylogHttp/blob/master/LICENSE)
[![Build status](https://ci.appveyor.com/api/projects/status/4g5uup3i6p4kx5tr/branch/master?svg=true)](https://ci.appveyor.com/project/dustinchilson/nlog-targets-grayloghttp/branch/master)
master)
[![NuGet](https://img.shields.io/nuget/v/NLog.Targets.GraylogHttp.svg)](https://www.nuget.org/packages/NLog.Targets.GraylogHttp)
[![Dependency Status](https://dependencyci.com/github/dustinchilson/NLog.Targets.GraylogHttp/badge)](https://dependencyci.com/github/dustinchilson/NLog.Targets.GraylogHttp)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=dustinchilson/NLog.Targets.GraylogHttp)](https://dependabot.com)


This is a custom target for NLog that pushes log messages to [Graylog](https://www.graylog.org/) using the Http input.
This is a custom target for NLog that pushes log messages to [Graylog](https://www.graylog.org/) using the Http input.

This library was influenced by [EasyGelf](https://github.com/Pliner/EasyGelf)

## Installation

This library is packaged as a nuget package available [here ](https://www.nuget.org/packages/NLog.Targets.GraylogHttp/)
This library is packaged as a nuget package available [here](https://www.nuget.org/packages/NLog.Targets.GraylogHttp/)

```
Install-Package NLog.Targets.GraylogHttp
```

## NetStandard & .net Core
## NetStandard, .Net Core, .Net Framwwork 4.5

This library runs under netstandard 1.3 and fully supports both netstandard and .net Core.
This library runs under netstandard 1.3 and fully supports both netstandard and .Net Framework

## Usage

Expand All @@ -34,15 +32,15 @@ Add or modify your NLog Configuration to add the new target and Extension Assemb
<add assembly="NLog.Targets.GraylogHttp"/>
</extensions>
<targets>
<target name="graylog"
xsi:type="GraylogHttp"
<target name="graylog"
xsi:type="GraylogHttp"
facility="[FACILITY]"
graylogServer="[SERVER]"
graylogPort="[PORT]">
<!-- Location information. -->
<parameter name="source_method" layout="${callsite}" />
<parameter name="source_line" layout="${callsite-linenumber}" />
<parameter name="test_prop" layout="${event-context:item=test_prop}" />
</target>
</targets>
Expand All @@ -57,7 +55,6 @@ Add or modify your NLog Configuration to add the new target and Extension Assemb
- *graylogPort* - OPTIONAL - server port, normally specified by Input in Graylog
- *facility* - OPTIONAL - variable could be used to identify your application, library, etc.


### Simple Logging

```
Expand All @@ -82,7 +79,6 @@ logger.Log(e);

In order to receive logs in your Graylog server, make sure you create **Input** for your application mentioned in [Getting Started](http://docs.graylog.org/en/3.0/pages/getting_started.html) guide under Collect Messages link.


## References

[Gelf Spec](http://docs.graylog.org/en/latest/pages/gelf.html)
50 changes: 0 additions & 50 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Task("Version")
Information($"::set-env name=GIT_VERSION::{versionInfo.FullSemVer}");
msBuildSettings.Properties.Add("PackageVersion", new List<string> { versionInfo.NuGetVersionV2 });
msBuildSettings.Properties.Add("PackageVersion", new List<string> { versionInfo.FullSemVer });
msBuildSettings.Properties.Add("Version", new List<string> { versionInfo.AssemblySemVer });
msBuildSettings.Properties.Add("FileVersion", new List<string> { versionInfo.AssemblySemVer });
msBuildSettings.Properties.Add("AssemblyVersion", new List<string> { versionInfo.AssemblySemVer });
Expand Down
7 changes: 1 addition & 6 deletions examples/netFx/NLogGraylogHttp.Example.NetFx/Program.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NLog;
using NLog;

namespace NLogGraylogHttp.Example.NetFx
{
Expand Down
3 changes: 1 addition & 2 deletions examples/netcore/NLogGraylogHttp.Example.NetCore/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using NLog;
using NLog.Extensions.Logging;
Expand Down
4 changes: 0 additions & 4 deletions src/NLog.Targets.GraylogHttp.Tests/MessageBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ namespace NLog.Targets.GraylogHttp.Tests
public class MessageBuilderTests
{
[Fact]
#pragma warning disable CA1822 // Mark members as static
public void SimpleMessageTest()
#pragma warning restore CA1822 // Mark members as static
{
var testMessage = new GraylogMessageBuilder()
.WithCustomProperty("facility", "Test")
Expand All @@ -24,9 +22,7 @@ public void SimpleMessageTest()
}

[Fact]
#pragma warning disable CA1822 // Mark members as static
public void MessageWithHugePropertyTest()
#pragma warning restore CA1822 // Mark members as static
{
var testMessage = new GraylogMessageBuilder()
.WithCustomProperty("facility", "Test")
Expand Down
7 changes: 1 addition & 6 deletions src/NLog.Targets.GraylogHttp.Tests/StringExtTests.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
using Xunit;
using Xunit;

namespace NLog.Targets.GraylogHttp.Tests
{
public class StringExtTests
{
[Fact]
#pragma warning disable CA1822 // Mark members as static
public void TruncateTest()
#pragma warning restore CA1822 // Mark members as static
{
var testString = new string('*', 50000).Truncate(1);
Assert.Equal("*", testString);
Expand Down
2 changes: 0 additions & 2 deletions src/NLog.Targets.GraylogHttp/GraylogHttpTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using NLog.Common;
using NLog.Config;
using Polly;
Expand Down
4 changes: 1 addition & 3 deletions src/NLog.Targets.GraylogHttp/GraylogParameterInfo.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Linq;
using NLog.Config;
using NLog.Config;
using NLog.Layouts;

namespace NLog.Targets.GraylogHttp
Expand Down
3 changes: 1 addition & 2 deletions src/NLog.Targets.GraylogHttp/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// Setting ComVisible to false makes the types in this assembly not visible
Expand Down

0 comments on commit 53e02d2

Please sign in to comment.