Skip to content

Commit 57022a6

Browse files
committed
Cleaned up the samples
1 parent 52913ed commit 57022a6

File tree

5 files changed

+23
-166
lines changed

5 files changed

+23
-166
lines changed

Exceptionless.Net.sln

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1111
global.json = global.json
1212
src\GlobalAssemblyInfo.cs = src\GlobalAssemblyInfo.cs
1313
LICENSE.txt = LICENSE.txt
14-
Source\nlog.config = Source\nlog.config
1514
Libraries\Package.ps1 = Libraries\Package.ps1
1615
README.md = README.md
1716
Libraries\Settings.ps1 = Libraries\Settings.ps1

src/Exceptionless.Tests/Submission/DefaultSubmissionClientTests.cs

Lines changed: 0 additions & 150 deletions
This file was deleted.

src/Samples/Exceptionless.SampleConsole/Program.cs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111
using Exceptionless.Helpers;
1212
using Exceptionless.Logging;
1313
using Exceptionless.Models;
14+
using Exceptionless.NLog;
1415
using Exceptionless.SampleConsole.Plugins;
1516
#if NET45
1617
using log4net;
1718
using log4net.Config;
1819
#endif
1920
using NLog;
21+
using NLog.Fluent;
2022
using LogLevel = Exceptionless.Logging.LogLevel;
2123

2224
// example of setting an attribute value in config.
@@ -55,10 +57,19 @@ public static void Main(string[] args) {
5557

5658
// Test NLog
5759
GlobalDiagnosticsContext.Set("GlobalProp", "GlobalValue");
58-
//Log.Info().Message("Hi").Tag("Tag1", "Tag2").Property("LocalProp", "LocalValue").MarkUnhandled("SomeMethod").ContextProperty("Blah", new Event()).Write();
59-
60-
//ExceptionlessClient.Default.SubmitLog(typeof(Program).Name, "Trace Message", LogLevel.Trace);
61-
60+
Log.Info()
61+
.Message("App Starting...")
62+
.Tag("Tag1", "Tag2")
63+
.Property("LocalProp", "LocalValue")
64+
.ContextProperty("Order", new { Total = 15 })
65+
.Write();
66+
67+
// This is how you could log the same message using the fluent api directly.
68+
//ExceptionlessClient.Default.CreateLog(typeof(Program).Name, "App Starting...", LogLevel.Info)
69+
// .AddTags("Tag1", "Tag2")
70+
// .SetProperty("LocalProp", "LocalValue")
71+
// .SetProperty("Order", new { Total = 15 })
72+
// .Submit();
6273
#if NET45
6374
// Test log4net
6475
XmlConfigurator.Configure();

src/Samples/Exceptionless.SampleConsole/project.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
{
22
"buildOptions": {
3-
"compile": [
4-
"**/*.cs",
5-
"../../GlobalAssemblyInfo.cs",
6-
"../../Exceptionless.Tests/Utility/RandomEventGenerator.cs"
7-
],
3+
"compile": {
4+
"include": [
5+
"**/*.cs",
6+
"../../GlobalAssemblyInfo.cs",
7+
"../../Exceptionless.Tests/Utility/RandomEventGenerator.cs"
8+
],
9+
"exclude": "store"
10+
},
811
"emitEntryPoint": true
912
},
1013
"dependencies": {

src/Samples/Exceptionless.SampleNancy/Exceptionless.SampleNancy.csproj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@
7070
</ItemGroup>
7171
<ItemGroup>
7272
<Content Include="packages.config" />
73-
<None Include="Web.Debug.config">
74-
<DependentUpon>Web.config</DependentUpon>
75-
</None>
76-
<None Include="Web.Release.config">
77-
<DependentUpon>Web.config</DependentUpon>
78-
</None>
7973
</ItemGroup>
8074
<PropertyGroup>
8175
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

0 commit comments

Comments
 (0)