Skip to content

Commit 96f8dfe

Browse files
author
mwatson
committed
Add new NLog project
1 parent 956acc8 commit 96f8dfe

File tree

8 files changed

+5580
-25
lines changed

8 files changed

+5580
-25
lines changed

Src/StackifyLib.nLog/StackifyLib.NLog.xproj renamed to Src/NLog.Targets.Stackify/NLog.Targets.Stackify.xproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@
44
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
55
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
66
</PropertyGroup>
7-
87
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
98
<PropertyGroup Label="Globals">
109
<ProjectGuid>55cc4568-242f-40d7-9bd3-23c4f502c161</ProjectGuid>
11-
<RootNamespace>StackifyLib.NLog</RootNamespace>
10+
<RootNamespace>StackifyLib.NLogger</RootNamespace>
1211
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
1312
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
1413
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1514
</PropertyGroup>
16-
1715
<PropertyGroup>
1816
<SchemaVersion>2.0</SchemaVersion>
1917
</PropertyGroup>
2018
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
21-
</Project>
19+
</Project>

Src/StackifyLib.nLog/Properties/AssemblyInfo.cs renamed to Src/NLog.Targets.Stackify/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
// General Information about an assembly is controlled through the following
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
8-
[assembly: AssemblyTitle("StackifyLib.nLog")]
8+
[assembly: AssemblyTitle("NLog.Targets.Stackify")]
99
[assembly: AssemblyDescription("")]
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
12-
[assembly: AssemblyProduct("StackifyLib.nLog")]
12+
[assembly: AssemblyProduct("NLog.Targets.Stackify")]
1313
[assembly: AssemblyCopyright("Copyright © 2015")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]

Src/StackifyLib.nLog/StackifyTarget.cs renamed to Src/NLog.Targets.Stackify/StackifyTarget.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
using System.Security;
1111
using System.Text;
1212
using System.Threading.Tasks;
13-
using NLog;
14-
using NLog.Targets;
1513
using StackifyLib;
1614
using System.Diagnostics;
1715
using StackifyLib.Internal.Logs;
1816
using StackifyLib.Models;
1917
using StackifyLib.Utils;
18+
using NLog.Targets;
19+
using NLog;
2020

21-
namespace StackifyLib.nLog
21+
namespace NLog.Targets.Stackify
2222
{
2323
[Target("StackifyTarget")]
2424
public class StackifyTarget : TargetWithLayout
@@ -42,19 +42,19 @@ protected override void CloseTarget()
4242
{
4343
try
4444
{
45-
Utils.StackifyAPILogger.Log("NLog target closing");
45+
StackifyLib.Utils.StackifyAPILogger.Log("NLog target closing");
4646
_logClient.Close();
4747
StackifyLib.Internal.Metrics.MetricClient.StopMetricsQueue("NLog CloseTarget");
4848
}
4949
catch (Exception ex)
5050
{
51-
Utils.StackifyAPILogger.Log("NLog target closing error: " + ex.ToString());
51+
StackifyLib.Utils.StackifyAPILogger.Log("NLog target closing error: " + ex.ToString());
5252
}
5353
}
5454

5555
protected override void InitializeTarget()
5656
{
57-
Utils.StackifyAPILogger.Log("NLog InitializeTarget");
57+
StackifyLib.Utils.StackifyAPILogger.Log("NLog InitializeTarget");
5858

5959
_logClient = new LogClient("StackifyLib.net-nlog", apiKey, uri);
6060
if (!String.IsNullOrEmpty(globalContextKeys))
@@ -82,7 +82,7 @@ protected override void Write(LogEventInfo logEvent)
8282
{
8383
//make sure the buffer isn't overflowing
8484
//if it is skip since we can't do anything with the message
85-
if (Logger.PrefixEnabled() || _logClient.CanQueue())
85+
if (StackifyLib.Logger.PrefixEnabled() || _logClient.CanQueue())
8686
{
8787
var logMsg = Translate(logEvent);
8888
if (logMsg != null)
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
2-
"version": "1.23.1-beta2",
2+
"version": "1.23.1",
33

4-
"title": "Stackify NLog",
4+
"title": "NLog.Targets.Stackify",
55

66
"packOptions": {
77
"owners": [ "stackify_matt", "jtaylorstackify" ],
8+
"author": "Matt Watson",
89
"tags": [ "stackify", "errors", "logs" ],
910
"summary": "NLog target to send errors and logs to Stackify and Prefix"
1011

@@ -17,18 +18,18 @@
1718
"frameworks": {
1819
"netstandard1.3": {
1920
"dependencies": {
20-
"NLog": "4.4.0-beta13"
21+
"NLog": "4.4.0-*"
2122
}
2223
},
2324
"net40": {
2425
"dependencies": {
25-
"NLog": "4.0.1"
26+
"NLog": "4.2.3"
2627
}
2728

2829
},
2930
"net45": {
3031
"dependencies": {
31-
"NLog": "4.0.1"
32+
"NLog": "4.2.3"
3233
}
3334

3435
}

0 commit comments

Comments
 (0)