Skip to content

Commit 8a7ae8c

Browse files
2 parents acddda1 + 64b2d1c commit 8a7ae8c

8 files changed

Lines changed: 186 additions & 125 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ A set of Nuget packages to help NET Core developers build simple quality logging
1111

1212

1313
![](https://3vrxww.bn1301.livefilestore.com/y3movaLJ4exXc8XSi7_LypJdB9KPDJB5JmjQrDcs_FcZoJ1N971CrF1AdweO3dZyN4XQxFQaIgvnSSqciiuQ4TxkQgUNhJRF3yNCaGfbSwRuEYgXkTMnfyptyBoUf__Kfk8nV8I3bf03TpPIwpy24Y6-A?width=1181&height=706&cropmode=none "ReflectInsight Viewer")
14-
[ReflectInsight Viewer](http://reflectsoftware.com)
15-
14+
[ReflectInsight Viewer](http://reflectsoftware.com)

samples/LoggingReflectInsight/Console.ReflectInsightSample/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ public static void Main(string[] args)
5555

5656
System.Console.WriteLine("Press any key to continue...");
5757
System.Console.ReadKey();
58-
5958
}
6059
}
6160
}

samples/LoggingReflectInsight/Console.ReflectInsightSample/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dependencies": {
88
"Microsoft.Extensions.Logging": "1.1.0",
99
"Microsoft.Extensions.Logging.Console": "1.1.0",
10-
"ReflectInsight.Extensions.Logging": "1.1.0-*"
10+
"ReflectInsight.Extensions.Logging": "1.1.2-*"
1111
},
1212

1313
"frameworks": {
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using Microsoft.Extensions.Logging;
3+
using ReflectInsight.Extensions.Logging;
4+
using System.Collections.Generic;
5+
6+
namespace WebApi.ExceptionInterceptSample.Controllers
7+
{
8+
[Route("api/[controller]")]
9+
public class ValuesController : Controller
10+
{
11+
private readonly ILogger _logger;
12+
13+
public ValuesController(ILoggerFactory loggerFactory)
14+
{
15+
_logger = loggerFactory.CreateLogger<ValuesController>();
16+
}
17+
18+
// GET: api/values
19+
[HttpGet]
20+
public IEnumerable<string> Get()
21+
{
22+
var result = new string[] { "value1", "value2" };
23+
24+
_logger.LogJSON("Test", result);
25+
26+
return result;
27+
}
28+
}
29+
}

samples/LoggingReflectInsight/WebApi.ReflectInsightSample/Startup.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
8989
logger.LogCritical("LogCritical");
9090
logger.LogCritical(exception, "LogCritical with exception");
9191
logger.LogCritical(exception);
92+
93+
logger.LogJSON("Test", new System.Collections.Generic.List<int> { 1, 2, 3 });
94+
logger.LogLoadedProcesses();
95+
logger.LogLoadedAssemblies();
9296
}
9397
}
9498
}

samples/LoggingReflectInsight/WebApi.ReflectInsightSample/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"Microsoft.Extensions.Configuration.FileExtensions": "1.1.0",
88
"Microsoft.Extensions.Logging.Abstractions": "1.1.0",
99
"Microsoft.Extensions.Logging": "1.1.0",
10-
"Microsoft.Extensions.Configuration.Json": "1.1.0",
11-
"ReflectInsight.Extensions.Logging": "1.1.0-*"
10+
"Microsoft.Extensions.Configuration.Json": "1.1.0",
11+
"ReflectInsight.Extensions.Logging": "1.1.2-*"
1212
},
1313

1414
"tools": {

src/ReflectInsight.Extensions.Logging/ReflectInsightLoggerExtensions.cs

Lines changed: 148 additions & 118 deletions
Large diffs are not rendered by default.

src/ReflectInsight.Extensions.Logging/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.1.0",
2+
"version": "1.1.2",
33
"title": "ReflectInsight.Extensions.Logging",
44
"language": "en-US",
55
"description": "A ReflectInsight Logger implementation Microsoft.Extensions.Logging",

0 commit comments

Comments
 (0)