Skip to content

Commit c4a8b53

Browse files
committed
Added more RI extensions.
1 parent 03ee6e8 commit c4a8b53

23 files changed

Lines changed: 2250 additions & 226 deletions

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
1-
# AspNet.Plus.Logging
1+
# ReflectInsight.Extensions.Logging
22

33
[![Build status](https://ci.appveyor.com/api/projects/status/oihv7jrwa92qbn9p?svg=true)](https://ci.appveyor.com/project/codematrix/aspnet-plus-logging)
44
[![Release](https://img.shields.io/github/release/aspnet-plus/AspNet.Plus.Logging.svg)](https://github.com/aspnet-plus/AspNet.Plus.Logging/releases/latest)
55
[![Stars](https://img.shields.io/github/stars/aspnet-plus/AspNet.Plus.Logging.svg)](https://github.com/aspnet-plus/AspNet.Plus.Logging/stargazers)
6-
[![Join the chat at https://gitter.im/aspnet-plus/AspNet.Plus.Logging](https://badges.gitter.im/aspnet-plus/AspNet.Plus.Logging.svg)](https://gitter.im/aspnet-plus/AspNet.Plus.Logging?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6+
77

88
A set of Nuget packages to help NET Core developers build simple quality logging related code.
99

10-
**NOTE**: *The AspNet.Plus.Logging.ReflectInsight only supports .NET Core Full Framework*
10+
**NOTE**: *The ReflectInsight.Extensions.Logging supports .NET Core Full Framework*
1111

1212
**Available Nuget packages**
1313

14-
* [![NuGet Version](http://img.shields.io/nuget/v/AspNet.Plus.Logging.ReflectInsight.svg?style=flat)](http://www.nuget.org/packages/AspNet.Plus.Logging.ReflectInsight/) AspNet.Plus.Logging.ReflectInsight
14+
* [![NuGet Version](http://img.shields.io/nuget/v/AspNet.Plus.Logging.ReflectInsight.svg?style=flat)](http://www.nuget.org/packages/AspNet.Plus.Logging.ReflectInsight/) ReflectInsight.Extensions.Logging
1515

1616

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

20-
### Helpful Links
21-
22-
* [Getting Started](https://github.com/aspnet-plus/Home/blob/master/README.md)
23-
* [How to contribute](https://github.com/aspnet-plus/Home/blob/master/CONTRIBUTING.md)
24-
* [Engineering Guidelines](https://github.com/aspnet-plus/Home/wiki/Engineering-guidelines)
25-
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,20 @@ EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "01. Solution Items", "01. Solution Items", "{D94023CF-59CC-4D69-B30B-991C7D52F49A}"
99
ProjectSection(SolutionItems) = preProject
1010
appveyor.yml = appveyor.yml
11-
header\AspNet.Plus.licenseheader = header\AspNet.Plus.licenseheader
1211
build.ps1 = build.ps1
1312
global.json = global.json
1413
README.md = README.md
1514
header\VersionInfo.cs = header\VersionInfo.cs
1615
EndProjectSection
1716
EndProject
18-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "AspNet.Plus.Logging.ReflectInsight", "src\AspNet.Plus.Logging.ReflectInsight\AspNet.Plus.Logging.ReflectInsight.xproj", "{E1B8B885-436F-480D-851A-C466E07DD6C8}"
19-
EndProject
2017
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "03. samples", "03. samples", "{0A6739C6-1BDC-4359-9339-CAA735531E0C}"
2118
EndProject
22-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "WebApi.ReflectInsightSample", "samples\LoggingReflectInsight\WebApi.ReflectInsightSample\WebApi.ReflectInsightSample.xproj", "{390BA242-1AE3-4E7B-9E55-21AE86E17458}"
19+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ReflectInsight.Extensions.Logging", "src\ReflectInsight.Extensions.Logging\ReflectInsight.Extensions.Logging.xproj", "{E1B8B885-436F-480D-851A-C466E07DD6C8}"
2320
EndProject
2421
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Console.ReflectInsightSample", "samples\LoggingReflectInsight\Console.ReflectInsightSample\Console.ReflectInsightSample.xproj", "{77B97056-6AFC-4450-93AE-9DA1664C5FFB}"
2522
EndProject
23+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "WebApi.ReflectInsightSample", "samples\LoggingReflectInsight\WebApi.ReflectInsightSample\WebApi.ReflectInsightSample.xproj", "{390BA242-1AE3-4E7B-9E55-21AE86E17458}"
24+
EndProject
2625
Global
2726
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2827
Debug|Any CPU = Debug|Any CPU
@@ -33,21 +32,21 @@ Global
3332
{E1B8B885-436F-480D-851A-C466E07DD6C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
3433
{E1B8B885-436F-480D-851A-C466E07DD6C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
3534
{E1B8B885-436F-480D-851A-C466E07DD6C8}.Release|Any CPU.Build.0 = Release|Any CPU
36-
{390BA242-1AE3-4E7B-9E55-21AE86E17458}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
37-
{390BA242-1AE3-4E7B-9E55-21AE86E17458}.Debug|Any CPU.Build.0 = Debug|Any CPU
38-
{390BA242-1AE3-4E7B-9E55-21AE86E17458}.Release|Any CPU.ActiveCfg = Release|Any CPU
39-
{390BA242-1AE3-4E7B-9E55-21AE86E17458}.Release|Any CPU.Build.0 = Release|Any CPU
4035
{77B97056-6AFC-4450-93AE-9DA1664C5FFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4136
{77B97056-6AFC-4450-93AE-9DA1664C5FFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
4237
{77B97056-6AFC-4450-93AE-9DA1664C5FFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
4338
{77B97056-6AFC-4450-93AE-9DA1664C5FFB}.Release|Any CPU.Build.0 = Release|Any CPU
39+
{390BA242-1AE3-4E7B-9E55-21AE86E17458}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40+
{390BA242-1AE3-4E7B-9E55-21AE86E17458}.Debug|Any CPU.Build.0 = Debug|Any CPU
41+
{390BA242-1AE3-4E7B-9E55-21AE86E17458}.Release|Any CPU.ActiveCfg = Release|Any CPU
42+
{390BA242-1AE3-4E7B-9E55-21AE86E17458}.Release|Any CPU.Build.0 = Release|Any CPU
4443
EndGlobalSection
4544
GlobalSection(SolutionProperties) = preSolution
4645
HideSolutionNode = FALSE
4746
EndGlobalSection
4847
GlobalSection(NestedProjects) = preSolution
4948
{E1B8B885-436F-480D-851A-C466E07DD6C8} = {BFA64C32-4422-4AF9-8ECF-D2ECF2E0230B}
50-
{390BA242-1AE3-4E7B-9E55-21AE86E17458} = {0A6739C6-1BDC-4359-9339-CAA735531E0C}
5149
{77B97056-6AFC-4450-93AE-9DA1664C5FFB} = {0A6739C6-1BDC-4359-9339-CAA735531E0C}
50+
{390BA242-1AE3-4E7B-9E55-21AE86E17458} = {0A6739C6-1BDC-4359-9339-CAA735531E0C}
5251
EndGlobalSection
5352
EndGlobal

header/AspNet.Plus.licenseheader

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# https://github.com/rubicon-oss/LicenseHeaderManager/wiki/Expendable-Properties
22
extensions: designer.cs generated.cs
33
extensions: .cs .cpp .h
4-
// ASP.NET.Plus
5-
// Copyright (c) %CurrentYear% ASP.NET Plus.
4+
// ReflectInsight
5+
// Copyright (c) %CurrentYear% ReflectSoftware.
66
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
77

88
extensions: .aspx .ascx
99
<%--
10-
ASP.NET.Plus
11-
Copyright (c) %CurrentYear% ASP.NET Plus.
10+
ReflectInsight
11+
Copyright (c) %CurrentYear% ReflectSoftware.
1212
Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
1313
--%>
1414
extensions: .xml .config .xsd
1515
<!--
16-
ASP.NET.Plus
17-
Copyright (c) %CurrentYear% ASP.NET Plus.
16+
ReflectInsight
17+
Copyright (c) %CurrentYear% ReflectSoftware.
1818
Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
1919
-->

header/VersionInfo.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using System.Reflection;
22
using System.Runtime.InteropServices;
33

4-
[assembly: AssemblyCompany("ASP.NET Plus")]
5-
[assembly: AssemblyProduct("ASP.NET Plus reusable common libraries.")]
6-
[assembly: AssemblyCopyright("Copyright (C) 2016 ASP.NET Plus.")]
7-
[assembly: AssemblyVersion("1.0.0.*")]
8-
[assembly: AssemblyFileVersion("1.0.0.*")]
9-
[assembly: AssemblyInformationalVersion("1.0.0 (rev 0)")]
4+
[assembly: AssemblyCompany("ReflectSoftware")]
5+
[assembly: AssemblyProduct("ReflectInsight Extensions Logging.")]
6+
[assembly: AssemblyCopyright("Copyright (C) 2017 ReflectSoftware.")]
7+
[assembly: AssemblyVersion("1.1.0.*")]
8+
[assembly: AssemblyFileVersion("1.1.0.*")]
9+
[assembly: AssemblyInformationalVersion("1.1.0 (rev 0)")]
1010
[assembly: ComVisible(false)]
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<PropertyGroup>
4-
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
5-
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6-
</PropertyGroup>
7-
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
8-
<PropertyGroup Label="Globals">
9-
<ProjectGuid>77b97056-6afc-4450-93ae-9da1664c5ffb</ProjectGuid>
10-
<RootNamespace>Console.ReflectInsightSample</RootNamespace>
11-
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
12-
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
13-
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
14-
</PropertyGroup>
15-
<ItemGroup>
16-
<Content Include="..\..\..\header\AspNet.Plus.licenseheader">
17-
<Link>AspNet.Plus.licenseheader</Link>
18-
</Content>
19-
</ItemGroup>
20-
<PropertyGroup>
21-
<SchemaVersion>2.0</SchemaVersion>
22-
</PropertyGroup>
23-
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
8+
<PropertyGroup Label="Globals">
9+
<ProjectGuid>77b97056-6afc-4450-93ae-9da1664c5ffb</ProjectGuid>
10+
<RootNamespace>Console.ReflectInsightSample</RootNamespace>
11+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
13+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
14+
</PropertyGroup>
15+
<PropertyGroup>
16+
<SchemaVersion>2.0</SchemaVersion>
17+
</PropertyGroup>
18+
<ItemGroup>
19+
<Content Include="..\..\..\header\AspNet.Plus.licenseheader">
20+
<Link>ReflectSoftware.licenseheader</Link>
21+
</Content>
22+
</ItemGroup>
23+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
2424
</Project>

samples/LoggingReflectInsight/Console.ReflectInsightSample/Program.cs

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// ASP.NET.Plus
2-
// Copyright (c) 2016 ASP.NET Plus.
1+
// ReflectInsight
2+
// Copyright (c) 2017 ReflectSoftware.
33
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
44

5-
using AspNet.Plus.Logging.ReflectInsight;
65
using Microsoft.Extensions.Logging;
6+
using ReflectInsight.Extensions.Logging;
77
using System;
88

99
namespace Console.ReflectInsightSample
@@ -18,12 +18,18 @@ public class Program
1818
/// <param name="args">The arguments.</param>
1919
public static void Main(string[] args)
2020
{
21-
var loggerFactory = new LoggerFactory();
21+
var loggerFactory = new LoggerFactory();
2222
loggerFactory.AddReflectInsight();
23-
24-
var logger = loggerFactory.CreateLogger<Program>();
23+
24+
var logger = loggerFactory.CreateLogger("Logger");
25+
26+
using (logger.BeginScope("Hello: {0}, {1}", 5, 6))
27+
{
28+
logger.LogWarning("LogWarning with some args: {0}, {2}", 1, 2);
29+
}
30+
2531
var exception = new Exception("Some exception");
26-
32+
2733
logger.LogDebug("LogDebug with some args: {0}, {2}", 1, 2);
2834
logger.LogTrace("LogTrace with some args: {0}, {2}", 1, 2);
2935

@@ -43,8 +49,13 @@ public static void Main(string[] args)
4349
logger.LogCritical(exception, "LogCritical with exception and some args: {0}, {2}", 1, 2);
4450
logger.LogCritical(exception);
4551

52+
logger.LogJSON("Test", new System.Collections.Generic.List<int>());
53+
logger.LogLoadedProcesses();
54+
logger.LogLoadedAssemblies();
55+
4656
System.Console.WriteLine("Press any key to continue...");
47-
System.Console.ReadKey();
57+
System.Console.ReadKey();
58+
4859
}
4960
}
5061
}

samples/LoggingReflectInsight/Console.ReflectInsightSample/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// ASP.NET.Plus
2-
// Copyright (c) 2016 ASP.NET Plus.
1+
// ReflectInsight
2+
// Copyright (c) 2017 ReflectSoftware.
33
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
44

55
using System.Reflection;

samples/LoggingReflectInsight/Console.ReflectInsightSample/ReflectInsight.config

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<!--
3-
ASP.NET.Plus
4-
Copyright (c) 2016 ASP.NET Plus.
3+
ReflectInsight
4+
Copyright (c) 2017 ReflectSoftware.
55
Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
66
-->
77
<configuration>
@@ -40,19 +40,19 @@
4040
<listenerGroups active="Development">
4141
<group name="Development" enabled="true">
4242
<destinations>
43-
<destination name="Viewer" enabled="true" filter="Level_Trace" details="Viewer" />
43+
<destination name="Viewer" enabled="true" filter="" details="Viewer" />
4444
<!--
45-
<destination name="BinaryFile" enabled="true" filter="Level_Trace" details="BinaryFile[path=.\Logs\Sample.rlg; autoSave=Weekly]" />
46-
<destination name="TextFile" enabled="true" filter="Level_Trace" details="TextFile[path=.\Logs\Sample.txt; messageDetails=Message|Details; messagePattern=pattern1; autoSave=Weekly]" />
45+
<destination name="BinaryFile" enabled="true" filter="" details="BinaryFile[path=.\Logs\Sample.rlg; autoSave=Weekly]" />
46+
<destination name="TextFile" enabled="true" filter="" details="TextFile[path=.\Logs\Sample.txt; messageDetails=Message|Details; messagePattern=pattern1; autoSave=Weekly]" />
4747
-->
4848
</destinations>
4949
</group>
5050
<group name="Release" enabled="true">
5151
<destinations>
5252
<destination name="Viewer" enabled="true" filter="Level_Info" details="Viewer" />
5353
<!--
54-
<destination name="BinaryFile" enabled="true" filter="Level_Info" details="BinaryFile[path=.\Logs\Sample.rlg; autoSave=Weekly]" />
55-
<destination name="TextFile" enabled="true" filter="Level_Info" details="TextFile[path=.\LogsSample.txt; messageDetails=Message|Details; messagePattern=pattern1; autoSave=Weekly]" />
54+
<destination name="BinaryFile" enabled="true" filter="" details="BinaryFile[path=.\Logs\Sample.rlg; autoSave=Weekly]" />
55+
<destination name="TextFile" enabled="true" filter="" details="TextFile[path=.\LogsSample.txt; messageDetails=Message|Details; messagePattern=pattern1; autoSave=Weekly]" />
5656
-->
5757
</destinations>
5858
</group>
@@ -69,6 +69,7 @@
6969
<method type="SendError" />
7070
<method type="SendException" />
7171
<method type="SendFatal" />
72+
<method type="EnterExitMethod" />
7273
</filter>
7374
<filter name="Level_Debug" mode="Include">
7475
<method type="SendDebug" />
@@ -79,6 +80,7 @@
7980
<method type="SendError" />
8081
<method type="SendException" />
8182
<method type="SendFatal" />
83+
<method type="EnterExitMethod" />
8284
</filter>
8385
<filter name="Level_Verbose" mode="Include">
8486
<method type="SendVerbose" />
@@ -87,6 +89,7 @@
8789
<method type="SendError" />
8890
<method type="SendException" />
8991
<method type="SendFatal" />
92+
<method type="EnterExitMethod" />
9093
</filter>
9194
<filter name="Level_Info" mode="Include">
9295
<method type="SendSendMessage" />
@@ -95,12 +98,14 @@
9598
<method type="SendError" />
9699
<method type="SendException" />
97100
<method type="SendFatal" />
101+
<method type="EnterExitMethod" />
98102
</filter>
99103
<filter name="Level_Warn" mode="Include">
100104
<method type="SendWarning" />
101105
<method type="SendError" />
102106
<method type="SendException" />
103107
<method type="SendFatal" />
108+
<method type="EnterExitMethod" />
104109
</filter>
105110
<filter name="Level_Error" mode="Include">
106111
<method type="SendError" />
@@ -110,6 +115,7 @@
110115
<filter name="Level_Critical" mode="Include">
111116
<method type="SendException" />
112117
<method type="SendFatal" />
118+
<method type="EnterExitMethod" />
113119
</filter>
114120
</filters>
115121

samples/LoggingReflectInsight/Console.ReflectInsightSample/project.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
{
1+
{
22
"version": "1.0.0-*",
33
"buildOptions": {
44
"emitEntryPoint": true
55
},
66

77
"dependencies": {
88
"Microsoft.Extensions.Logging": "1.1.0",
9-
"AspNet.Plus.Logging.ReflectInsight": "1.1.0-*"
9+
"Microsoft.Extensions.Logging.Console": "1.1.0",
10+
"ReflectInsight.Extensions.Logging": "1.1.0-*"
1011
},
1112

1213
"frameworks": {

samples/LoggingReflectInsight/WebApi.ReflectInsightSample/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// ASP.NET.Plus
2-
// Copyright (c) 2016 ASP.NET Plus.
1+
// ReflectInsight
2+
// Copyright (c) 2017 ReflectSoftware.
33
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
44

55
using Microsoft.AspNetCore.Builder;

0 commit comments

Comments
 (0)