├── examples ├── .vs │ ├── Examples │ │ └── v15 │ │ │ ├── sqlite3 │ │ │ ├── db.lock │ │ │ └── storage.ide │ │ │ └── Server │ │ │ └── sqlite3 │ │ │ ├── db.lock │ │ │ └── storage.ide │ └── restore.dg ├── SimpleDotnetcoreWebApplication │ ├── wwwroot │ │ ├── js │ │ │ ├── site.min.js │ │ │ └── site.js │ │ ├── favicon.ico │ │ ├── lib │ │ │ ├── bootstrap │ │ │ │ ├── dist │ │ │ │ │ ├── fonts │ │ │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ │ │ ├── js │ │ │ │ │ │ └── npm.js │ │ │ │ │ └── css │ │ │ │ │ │ └── bootstrap-theme.min.css.map │ │ │ │ ├── .bower.json │ │ │ │ └── LICENSE │ │ │ ├── jquery │ │ │ │ ├── .bower.json │ │ │ │ └── LICENSE.txt │ │ │ ├── jquery-validation │ │ │ │ ├── .bower.json │ │ │ │ └── LICENSE.md │ │ │ └── jquery-validation-unobtrusive │ │ │ │ ├── .bower.json │ │ │ │ └── jquery.validate.unobtrusive.min.js │ │ ├── css │ │ │ ├── site.min.css │ │ │ └── site.css │ │ └── _references.js │ ├── .bowerrc │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── Home │ │ │ ├── About.cshtml │ │ │ └── Contact.cshtml │ │ ├── _ViewImports.cshtml │ │ └── Shared │ │ │ ├── Error.cshtml │ │ │ └── _Layout.cshtml │ ├── bower.json │ ├── appsettings.json │ ├── web.config │ ├── Program.cs │ ├── bundleconfig.json │ ├── Properties │ │ └── launchSettings.json │ ├── Log4NetLoggerProvider.cs │ ├── Log4NetAspExtensions.cs │ ├── Controllers │ │ └── HomeController.cs │ ├── SimpleDotnetcoreWebApplication.csproj │ ├── Log4NetAdapter.cs │ └── Startup.cs ├── UpgradeLog.htm ├── Backup │ ├── global.json │ ├── SimpleDotnetcoreConsoleApplicationUdpPackage │ │ ├── project.json │ │ └── SimpleDotnetcoreConsoleApplicationUdpPackage.xproj │ ├── SimpleDotnetcoreConsoleApplicationAmqpPackage │ │ ├── project.json │ │ └── SimpleDotnetcoreConsoleApplicationAmqpPackage.xproj │ ├── SimpleDotnetcoreConsoleApplicationHttpPackage │ │ ├── project.json │ │ └── SimpleDotnetcoreConsoleApplicationHttpPackage.xproj │ ├── SimpleDotnetcoreConsoleApplication │ │ ├── project.json │ │ └── SimpleDotnetcoreConsoleApplication.xproj │ └── SimpleDotnetcoreWebApplication │ │ ├── SimpleDotnetcoreWebApplication.xproj │ │ └── project.json ├── JSNLogDemo_Log4Net │ ├── Logs │ │ ├── log.txt │ │ └── log.txt.2017-02-28 │ ├── Global.asax │ ├── Controllers │ │ └── HomeController.cs │ ├── Global.asax.cs │ ├── App_Start │ │ ├── RouteConfig.cs │ │ └── JSNLogConfig.cs │ ├── scripts │ │ └── jsnlogdemo.js │ ├── Views │ │ ├── Home │ │ │ └── Index.cshtml │ │ └── web.config │ ├── Web.Debug.config │ ├── Web.Release.config │ └── Properties │ │ └── AssemblyInfo.cs ├── RandomSentence │ ├── Resources.resources │ ├── Resources │ │ ├── SeamlessMetal.jpg │ │ ├── questionwords.txt │ │ ├── syntax.txt │ │ ├── pronouns.txt │ │ ├── prepositions.txt │ │ └── adverbs.txt │ ├── RandomSentenceForm.resources │ ├── Properties │ │ ├── Resources.resources │ │ ├── Settings.settings │ │ ├── Settings.Designer.cs │ │ ├── AssemblyInfo.cs │ │ └── Resources.Designer.cs │ ├── Program.cs │ ├── packages.config │ ├── Resources.Designer.cs │ ├── RandomSentenceForm.Designer.cs │ └── RandomSentenceForm.cs ├── SimpleConsoleApplicationUdpPackage │ ├── packages.config │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── App.config │ └── SimpleConsoleApplicationUdpPackage.csproj ├── SimpleConsoleApplicationAmqpPackage │ ├── packages.config │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── App.config │ └── SimpleConsoleApplicationAmqpPackage.csproj ├── SimpleConsoleApplicationHttpPackage │ ├── packages.config │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── App.config ├── SimpleDotnetcoreConsoleApplication │ ├── SimpleDotnetcoreConsoleApplication.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Program.cs ├── SimpleConsoleApplicationCorePackage │ ├── Program.cs │ ├── packages.config │ ├── Properties │ │ └── AssemblyInfo.cs │ └── App.config ├── SimpleDotnetcoreConsoleApplicationUdpPackage │ ├── SimpleDotnetcoreConsoleApplicationUdpPackage.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Program.cs │ └── log4net.config ├── SimpleDotnetcoreConsoleApplicationAmqpPackage │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SimpleDotnetcoreConsoleApplicationAmqpPackage.csproj │ ├── Program.cs │ └── log4net.config ├── SimpleDotnetcoreConsoleApplicationHttpPackage │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SimpleDotnetcoreConsoleApplicationHttpPackage.csproj │ ├── Program.cs │ └── log4net.config ├── SimpleConsoleApplication │ ├── packages.config │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Program.cs └── SimpleConsoleApplicationLoggingEvent │ ├── packages.config │ ├── Properties │ └── AssemblyInfo.cs │ ├── Program.cs │ └── App.config ├── excludeInternalize.txt ├── icon.png ├── gelf4net_icon.pdn ├── src ├── Gelf4Net │ ├── Gelf4Net.snk │ ├── TypeForwarders.cs │ └── Gelf4Net.csproj ├── Gelf4Net.Core │ ├── Gelf4Net.Core.snk │ ├── ObjectRenderer │ │ └── GelfRenderer.cs │ ├── Util │ │ ├── BufferedSenderOptions.cs │ │ ├── TypeConverters │ │ │ └── IPAddressConverter.cs │ │ └── BufferedLogSender.cs │ ├── Gelf4Net.Core.csproj │ ├── Internals.cs │ ├── Extensions.cs │ └── GelfMessage.cs ├── Gelf4Net.AmqpAppender │ ├── Gelf4Net.AmqpAppender.snk │ ├── TypeForwarders.cs │ ├── Gelf4Net.AmqpAppender.csproj │ └── AsyncGelfAmqpAppender.cs ├── Gelf4Net.HttpAppender │ ├── Gelf4Net.HttpAppender.snk │ ├── TypeForwarders.cs │ ├── Gelf4Net.HttpAppender.csproj │ ├── AsyncGelfHttpAppender.cs │ └── GelfHttpAppender.cs ├── Gelf4Net.UdpAppender │ ├── Gelf4Net.UdpAppender.snk │ ├── TypeForwarders.cs │ ├── Gelf4Net.UdpAppender.csproj │ └── AsyncGelfUdpAppender.cs └── Directory.Build.props ├── .config └── dotnet-tools.json ├── nuget.config ├── .editorconfig ├── test └── Gelf4net.Tests │ ├── Gelf4net.Tests.csproj │ └── GelfUdpAppenderTests.cs ├── .gitignore └── LICENSE.md /examples/.vs/Examples/v15/sqlite3/db.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /excludeInternalize.txt: -------------------------------------------------------------------------------- 1 | gelf4net.Appender.* -------------------------------------------------------------------------------- /examples/.vs/Examples/v15/Server/sqlite3/db.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/js/site.min.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/icon.png -------------------------------------------------------------------------------- /gelf4net_icon.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/gelf4net_icon.pdn -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "wwwroot/lib" 3 | } 4 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Write your Javascript code. 2 | -------------------------------------------------------------------------------- /examples/UpgradeLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/examples/UpgradeLog.htm -------------------------------------------------------------------------------- /src/Gelf4Net/Gelf4Net.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/src/Gelf4Net/Gelf4Net.snk -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /examples/Backup/global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "1.0.0-preview2-1-003177" 4 | } 5 | } -------------------------------------------------------------------------------- /examples/JSNLogDemo_Log4Net/Logs/log.txt: -------------------------------------------------------------------------------- 1 | 2021-02-18 19:53:21,350 | INFO | serverlogger | info server log message 2 | -------------------------------------------------------------------------------- /src/Gelf4Net.Core/Gelf4Net.Core.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/src/Gelf4Net.Core/Gelf4Net.Core.snk -------------------------------------------------------------------------------- /examples/RandomSentence/Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/examples/RandomSentence/Resources.resources -------------------------------------------------------------------------------- /examples/.vs/Examples/v15/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/examples/.vs/Examples/v15/sqlite3/storage.ide -------------------------------------------------------------------------------- /examples/.vs/restore.dg: -------------------------------------------------------------------------------- 1 | #:C:\Users\jjchiw\Documents\GitHub\gelf4net\examples\SimpleDotnetcoreWebApplication\SimpleDotnetcoreWebApplication.xproj 2 | -------------------------------------------------------------------------------- /examples/JSNLogDemo_Log4Net/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="JSNLogDemo_Log4Net.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /examples/RandomSentence/Resources/SeamlessMetal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/examples/RandomSentence/Resources/SeamlessMetal.jpg -------------------------------------------------------------------------------- /src/Gelf4Net.AmqpAppender/Gelf4Net.AmqpAppender.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/src/Gelf4Net.AmqpAppender/Gelf4Net.AmqpAppender.snk -------------------------------------------------------------------------------- /src/Gelf4Net.HttpAppender/Gelf4Net.HttpAppender.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/src/Gelf4Net.HttpAppender/Gelf4Net.HttpAppender.snk -------------------------------------------------------------------------------- /src/Gelf4Net.UdpAppender/Gelf4Net.UdpAppender.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/src/Gelf4Net.UdpAppender/Gelf4Net.UdpAppender.snk -------------------------------------------------------------------------------- /examples/.vs/Examples/v15/Server/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/examples/.vs/Examples/v15/Server/sqlite3/storage.ide -------------------------------------------------------------------------------- /examples/RandomSentence/RandomSentenceForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/examples/RandomSentence/RandomSentenceForm.resources -------------------------------------------------------------------------------- /src/Gelf4Net.AmqpAppender/TypeForwarders.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly:TypeForwardedTo(typeof(Gelf4Net.Layout.GelfLayout))] 4 | -------------------------------------------------------------------------------- /src/Gelf4Net.HttpAppender/TypeForwarders.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly:TypeForwardedTo(typeof(Gelf4Net.Layout.GelfLayout))] 4 | -------------------------------------------------------------------------------- /src/Gelf4Net.UdpAppender/TypeForwarders.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly:TypeForwardedTo(typeof(Gelf4Net.Layout.GelfLayout))] 4 | -------------------------------------------------------------------------------- /examples/RandomSentence/Properties/Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/examples/RandomSentence/Properties/Resources.resources -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/examples/SimpleDotnetcoreWebApplication/wwwroot/favicon.ico -------------------------------------------------------------------------------- /examples/RandomSentence/Resources/questionwords.txt: -------------------------------------------------------------------------------- 1 | Who 2 | What 3 | Where 4 | When 5 | Why 6 | How 7 | Which 8 | Wherefore 9 | Whatever 10 | Whom 11 | Whose 12 | Wherewith 13 | Whither 14 | Whence -------------------------------------------------------------------------------- /.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "cake.tool": { 6 | "version": "1.0.0", 7 | "commands": [ 8 | "dotnet-cake" 9 | ] 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "About"; 3 | } 4 |

@ViewData["Title"].

5 |

@ViewData["Message"]

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/examples/SimpleDotnetcoreWebApplication/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/examples/SimpleDotnetcoreWebApplication/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/examples/SimpleDotnetcoreWebApplication/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using SimpleDotnetcoreWebApplication 2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 3 | @inject Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration TelemetryConfiguration 4 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjchiw/gelf4net/HEAD/examples/SimpleDotnetcoreWebApplication/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "asp.net", 3 | "private": true, 4 | "dependencies": { 5 | "bootstrap": "3.3.6", 6 | "jquery": "2.2.0", 7 | "jquery-validation": "1.14.0", 8 | "jquery-validation-unobtrusive": "3.2.6" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/RandomSentence/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ApplicationInsights": { 3 | "InstrumentationKey": "" 4 | }, 5 | "Logging": { 6 | "IncludeScopes": false, 7 | "LogLevel": { 8 | "Default": "Debug", 9 | "System": "Information", 10 | "Microsoft": "Information" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/css/site.min.css: -------------------------------------------------------------------------------- 1 | body{padding-top:50px;padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}input,select,textarea{max-width:280px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}@media screen and (max-width:767px){.carousel-caption{display:none}} -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | insert_final_newline = true 5 | 6 | [*.cs] 7 | indent_style = space 8 | indent_size = 4 9 | 10 | [*.cake] 11 | indent_style = space 12 | indent_size = 2 13 | 14 | [*.json] 15 | indent_style = space 16 | indent_size = 2 17 | 18 | [*.{config,xml,csproj,props}] 19 | indent_style = space 20 | indent_size = 2 21 | 22 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/_references.js: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | /// 5 | /// 6 | /// 7 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationUdpPackage/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/Backup/SimpleDotnetcoreConsoleApplicationUdpPackage/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "buildOptions": { 4 | "emitEntryPoint": true 5 | }, 6 | 7 | "dependencies": { 8 | "Gelf4Net.UdpAppender": "1.0.0.6", 9 | "Microsoft.NETCore.App": { 10 | "type": "platform", 11 | "version": "1.0.1" 12 | } 13 | }, 14 | 15 | "frameworks": { 16 | "netcoreapp1.0": { 17 | "imports": "dnxcore50" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/Backup/SimpleDotnetcoreConsoleApplicationAmqpPackage/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "buildOptions": { 4 | "emitEntryPoint": true 5 | }, 6 | 7 | "dependencies": { 8 | "Gelf4Net.AmqpAppender": "1.0.0.6", 9 | "Microsoft.NETCore.App": { 10 | "type": "platform", 11 | "version": "1.0.1" 12 | } 13 | }, 14 | 15 | "frameworks": { 16 | "netcoreapp1.0": { 17 | "imports": "dnxcore50" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/Backup/SimpleDotnetcoreConsoleApplicationHttpPackage/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "buildOptions": { 4 | "emitEntryPoint": true 5 | }, 6 | 7 | "dependencies": { 8 | "Gelf4Net.HttpAppender": "1.0.0.6", 9 | "Microsoft.NETCore.App": { 10 | "type": "platform", 11 | "version": "1.0.1" 12 | } 13 | }, 14 | 15 | "frameworks": { 16 | "netcoreapp1.0": { 17 | "imports": "dnxcore50" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0.3.1 4 | 1.0.3.1 5 | micahlmartin, jjchiw, contributors 6 | https://github.com/jjchiw/gelf4net 7 | icon.png 8 | LICENSE.md 9 | https://github.com/jjchiw/gelf4net 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/Backup/SimpleDotnetcoreConsoleApplication/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "buildOptions": { 4 | "emitEntryPoint": true 5 | }, 6 | 7 | "dependencies": { 8 | "Gelf4Net": "3.0.0.2", 9 | "Microsoft.NETCore.App": { 10 | "type": "platform", 11 | "version": "1.0.1" 12 | } 13 | }, 14 | 15 | "frameworks": { 16 | "netcoreapp1.0": { 17 | "imports": "dnxcore50" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Contact"; 3 | } 4 |

@ViewData["Title"].

5 |

@ViewData["Message"]

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
18 | -------------------------------------------------------------------------------- /src/Gelf4Net/TypeForwarders.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly:TypeForwardedTo(typeof(Gelf4Net.Layout.GelfLayout))] 4 | [assembly:TypeForwardedTo(typeof(Gelf4Net.Appender.GelfHttpAppender))] 5 | [assembly:TypeForwardedTo(typeof(Gelf4Net.Appender.AsyncGelfHttpAppender))] 6 | [assembly:TypeForwardedTo(typeof(Gelf4Net.Appender.GelfUdpAppender))] 7 | [assembly:TypeForwardedTo(typeof(Gelf4Net.Appender.AsyncGelfUdpAppender))] 8 | [assembly:TypeForwardedTo(typeof(Gelf4Net.Appender.GelfAmqpAppender))] 9 | [assembly:TypeForwardedTo(typeof(Gelf4Net.Appender.AsyncGelfAmqpAppender))] 10 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/lib/bootstrap/dist/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /examples/JSNLogDemo_Log4Net/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace JSNLogDemo_Log4Net.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | // GET: Home 12 | public ActionResult Index() 13 | { 14 | 15 | log4net.ILog log = log4net.LogManager.GetLogger("serverlogger"); 16 | log.Info("info server log message"); 17 | 18 | return View(); 19 | } 20 | } 21 | } 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/RandomSentence/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace SandboxWindow 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new RadomSentenceForm()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/Gelf4net.Tests/Gelf4net.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | net6.0 9 | false 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationAmqpPackage/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Gelf4Net.Core/ObjectRenderer/GelfRenderer.cs: -------------------------------------------------------------------------------- 1 | using log4net.ObjectRenderer; 2 | using log4net.Util; 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | 9 | namespace Gelf4Net.ObjectRenderer 10 | { 11 | public class GelfRenderer : IObjectRenderer 12 | { 13 | public void RenderObject(RendererMap rendererMap, object obj, System.IO.TextWriter writer) 14 | { 15 | var dictionary = obj as IDictionary; 16 | if (dictionary == null) 17 | writer.Write(SystemInfo.NullText); 18 | 19 | 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /examples/JSNLogDemo_Log4Net/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | 9 | namespace JSNLogDemo_Log4Net 10 | { 11 | public class MvcApplication : System.Web.HttpApplication 12 | { 13 | protected void Application_Start() 14 | { 15 | RouteConfig.RegisterRoutes(RouteTable.Routes); 16 | 17 | 18 | log4net.Config.XmlConfigurator.Configure(); 19 | 20 | } 21 | 22 | protected void Application_BeginRequest() 23 | { 24 | 25 | 26 | } 27 | } 28 | } 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/lib/jquery/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "main": "dist/jquery.js", 4 | "license": "MIT", 5 | "ignore": [ 6 | "package.json" 7 | ], 8 | "keywords": [ 9 | "jquery", 10 | "javascript", 11 | "browser", 12 | "library" 13 | ], 14 | "homepage": "https://github.com/jquery/jquery-dist", 15 | "version": "2.2.0", 16 | "_release": "2.2.0", 17 | "_resolution": { 18 | "type": "version", 19 | "tag": "2.2.0", 20 | "commit": "6fc01e29bdad0964f62ef56d01297039cdcadbe5" 21 | }, 22 | "_source": "git://github.com/jquery/jquery-dist.git", 23 | "_target": "2.2.0", 24 | "_originalSource": "jquery" 25 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.[Cc]ache 2 | *.csproj.user 3 | *.[Rr]e[Ss]harper* 4 | *.sln.cache 5 | *.suo 6 | *.user 7 | *.orig 8 | *.pidb 9 | *.userprefs 10 | .DS_Store 11 | deploy/ 12 | build/ 13 | [Bb]in/ 14 | [Dd]ebug/ 15 | [Oo]bj/ 16 | [Rr]elease/ 17 | _[Rr]e[Ss]harper.*/ 18 | *.docstates 19 | *.tss 20 | *.ncrunchproject 21 | *.ncrunchsolution 22 | TestResults 23 | .DS_Store 24 | *.dotcover 25 | *.userprefs 26 | packages/**/* 27 | binaries 28 | *testresult* 29 | src/packages/ 30 | examples/packages 31 | upload.ps1 32 | /.gelf4netcore.xproj.swp 33 | /project.lock.json 34 | .vs/ 35 | tools/ 36 | private/ 37 | .vscode/ 38 | src/.vs/ 39 | examples/JSNLogDemo_Log4Net/Logs/ 40 | 41 | artifacts/ 42 | examples/.vs/ 43 | .idea 44 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Hosting; 7 | 8 | namespace SimpleDotnetcoreWebApplication 9 | { 10 | public class Program 11 | { 12 | public static void Main(string[] args) 13 | { 14 | var host = new WebHostBuilder() 15 | .UseKestrel() 16 | .UseContentRoot(Directory.GetCurrentDirectory()) 17 | .UseIISIntegration() 18 | .UseStartup() 19 | .Build(); 20 | 21 | host.Run(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /examples/JSNLogDemo_Log4Net/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace JSNLogDemo_Log4Net 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/JSNLogDemo_Log4Net/scripts/jsnlogdemo.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | // Log with every severity 5 | JL("jsLogger").debug("debug client log message"); 6 | JL("jsLogger").info("info client log message"); 7 | JL("jsLogger").warn({ msg: 'warn client log message - logging object', x: 5, y: 88 }); 8 | JL("jsLogger").error(function() { return "error client log message - returned by function"; }); 9 | JL("jsLogger").fatal("fatal client log message"); 10 | 11 | // Log caught exception 12 | try { 13 | // ReferenceError: xyz is not defined 14 | xyz; 15 | } catch (e) { 16 | // Log the exception 17 | JL().fatalException("Something went wrong!", e); 18 | } 19 | 20 | // ReferenceError: xyz2 is not defined. Should be caught by onerror handler. 21 | xyz2; 22 | 23 | -------------------------------------------------------------------------------- /examples/RandomSentence/Resources/syntax.txt: -------------------------------------------------------------------------------- 1 | The [Adjective] [Noun] will [Adverb] [Verb] the [Adjective] [Noun]... 2 | Who will [Verb] the [Noun]? 3 | Is the [Noun] some form of [Adverb] [Adjective] [Noun]? 4 | The [Adjective] [Noun] is going to [Verb] my [Noun]! HELP! 5 | The [Adjective] [Noun] [Verb]s :) 6 | No one expects the [Adjective] [Noun]!!! 7 | We put some [Adjective] [Noun] in your [Noun] so you can [Verb] while you [Verb] 8 | Don't [Verb] the [Noun]. 9 | We're [Adjective] to see you're still [Adverb] [Adjective] 10 | The [Noun] can still [Verb] a [Noun]. Your argument is invalid. 11 | We're in your [Noun]. And We're going to [Verb] your [Noun]s now... Sorry. 12 | We're really happy for you, but we had the best [Adjective] [Noun] of all time! -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/bundleconfig.json: -------------------------------------------------------------------------------- 1 | // Configure bundling and minification for the project. 2 | // More info at https://go.microsoft.com/fwlink/?LinkId=808241 3 | [ 4 | { 5 | "outputFileName": "wwwroot/css/site.min.css", 6 | // An array of relative input file paths. Globbing patterns supported 7 | "inputFiles": [ 8 | "wwwroot/css/site.css" 9 | ] 10 | }, 11 | { 12 | "outputFileName": "wwwroot/js/site.min.js", 13 | "inputFiles": [ 14 | "wwwroot/js/site.js" 15 | ], 16 | // Optionally specify minification options 17 | "minify": { 18 | "enabled": true, 19 | "renameLocals": true 20 | }, 21 | // Optinally generate .map file 22 | "sourceMap": false 23 | } 24 | ] 25 | -------------------------------------------------------------------------------- /src/Gelf4Net.Core/Util/BufferedSenderOptions.cs: -------------------------------------------------------------------------------- 1 | namespace Gelf4Net.Util 2 | { 3 | internal class BufferedSenderOptions 4 | { 5 | /// 6 | /// Number of tasks to use for the async appender. 0 or fewer indicates one task per processor. 7 | /// 8 | public int? NumTasks { get; set; } 9 | 10 | /// 11 | /// Number of log lines to buffer for async send. Defaults to if unset. 12 | /// 13 | public int? BufferSize { get; internal set; } 14 | 15 | /// 16 | /// Default Number of Items to Buffer for Async Appenders 17 | /// 18 | internal static int DefaultBufferSize = 1000; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationHttpPackage/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:61257/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "SimpleDotnetcoreWebApplication": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "launchUrl": "http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Error"; 3 | } 4 | 5 |

Error.

6 |

An error occurred while processing your request.

7 | 8 |

Development Mode

9 |

10 | Swapping to Development environment will display more detailed information about the error that occurred. 11 |

12 |

13 | Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application. 14 |

15 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationUdpPackage/Program.cs: -------------------------------------------------------------------------------- 1 | using log4net; 2 | using System; 3 | 4 | namespace SimpleConsoleApplication 5 | { 6 | class Program 7 | { 8 | protected static readonly ILog log = LogManager.GetLogger(typeof(Program)); 9 | 10 | static void Main(string[] args) 11 | { 12 | log4net.Config.XmlConfigurator.Configure(); 13 | 14 | Console.WriteLine("Write a sentence, q to quit"); 15 | 16 | var text = Console.ReadLine(); 17 | 18 | while (text != "q") 19 | { 20 | log.Debug(String.Format("Randomizer Sentence: {0}", text)); 21 | Console.WriteLine("Sent {0}", text); 22 | 23 | text = Console.ReadLine(); 24 | 25 | Console.WriteLine("Sent"); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /examples/RandomSentence/Resources/pronouns.txt: -------------------------------------------------------------------------------- 1 | all 2 | another 3 | any 4 | anybody 5 | anyone 6 | anything 7 | both 8 | each 9 | each other 10 | either 11 | everybody 12 | everyone 13 | everything 14 | few 15 | he 16 | her 17 | hers 18 | herself 19 | him 20 | himself 21 | his 22 | I 23 | it 24 | its 25 | itself 26 | little 27 | many 28 | me 29 | mine 30 | more 31 | most 32 | much 33 | my 34 | myself 35 | neither 36 | noone 37 | nobody 38 | none 39 | nothing 40 | one 41 | one another 42 | other 43 | others 44 | our 45 | ours 46 | ourselves 47 | several 48 | she 49 | some 50 | somebody 51 | someone 52 | something 53 | that 54 | their 55 | theirs 56 | them 57 | themselves 58 | these 59 | they 60 | this 61 | those 62 | us 63 | we 64 | what 65 | whatever 66 | which 67 | whichever 68 | who 69 | whoever 70 | whom 71 | whomever 72 | whose 73 | you 74 | your 75 | yours 76 | yourself 77 | yourselves -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Wrapping element */ 7 | /* Set some basic padding to keep content from hitting the edges */ 8 | .body-content { 9 | padding-left: 15px; 10 | padding-right: 15px; 11 | } 12 | 13 | /* Set widths on the form inputs since otherwise they're 100% wide */ 14 | input, 15 | select, 16 | textarea { 17 | max-width: 280px; 18 | } 19 | 20 | /* Carousel */ 21 | .carousel-caption p { 22 | font-size: 20px; 23 | line-height: 1.4; 24 | } 25 | 26 | /* Make .svg files in the carousel display properly in older browsers */ 27 | .carousel-inner .item img[src$=".svg"] 28 | { 29 | width: 100%; 30 | } 31 | 32 | /* Hide/rearrange for smaller screens */ 33 | @media screen and (max-width: 767px) { 34 | /* Hide captions */ 35 | .carousel-caption { 36 | display: none 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplication/SimpleDotnetcoreConsoleApplication.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | SimpleDotnetcoreConsoleApplication 6 | Exe 7 | SimpleDotnetcoreConsoleApplication 8 | false 9 | false 10 | false 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Always 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/RandomSentence/Resources/prepositions.txt: -------------------------------------------------------------------------------- 1 | aboard 2 | about 3 | above 4 | absent 5 | across 6 | after 7 | against 8 | along 9 | alongside 10 | amid 11 | amidst 12 | among 13 | anti 14 | around 15 | as 16 | at 17 | atop 18 | before 19 | behind 20 | below 21 | beneath 22 | beside 23 | besides 24 | between 25 | beyond 26 | but 27 | by 28 | concerning 29 | considering 30 | despite 31 | down 32 | during 33 | except 34 | excepting 35 | excluding 36 | following 37 | for 38 | from 39 | in 40 | in front of 41 | inside 42 | instead of 43 | into 44 | like 45 | mid 46 | minus 47 | near 48 | next 49 | of 50 | off 51 | on 52 | on top of 53 | onto 54 | opposite 55 | outof 56 | outside 57 | over 58 | past 59 | per 60 | plus 61 | regarding 62 | round 63 | save 64 | since 65 | than 66 | through 67 | till 68 | times 69 | to 70 | toward 71 | towards 72 | under 73 | underneath 74 | unlike 75 | until 76 | up 77 | upon 78 | versus 79 | via 80 | with 81 | within 82 | without -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationAmqpPackage/Program.cs: -------------------------------------------------------------------------------- 1 | using log4net; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace SimpleConsoleApplication 9 | { 10 | class Program 11 | { 12 | protected static readonly ILog log = LogManager.GetLogger(typeof(Program)); 13 | 14 | static void Main(string[] args) 15 | { 16 | log4net.Config.XmlConfigurator.Configure(); 17 | 18 | Console.WriteLine("Write a sentence, q to quit"); 19 | 20 | var text = Console.ReadLine(); 21 | 22 | while(text != "q") 23 | { 24 | log.Debug(String.Format("Randomizer Sentence: {0}", text)); 25 | Console.WriteLine("Sent {0}", text); 26 | 27 | text = Console.ReadLine(); 28 | 29 | Console.WriteLine("Sent"); 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationCorePackage/Program.cs: -------------------------------------------------------------------------------- 1 | using log4net; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace SimpleConsoleApplication 9 | { 10 | class Program 11 | { 12 | protected static readonly ILog log = LogManager.GetLogger(typeof(Program)); 13 | 14 | static void Main(string[] args) 15 | { 16 | log4net.Config.XmlConfigurator.Configure(); 17 | 18 | Console.WriteLine("Write a sentence, q to quit"); 19 | 20 | var text = Console.ReadLine(); 21 | 22 | while(text != "q") 23 | { 24 | log.Debug(String.Format("Randomizer Sentence: {0}", text)); 25 | Console.WriteLine("Sent {0}", text); 26 | 27 | text = Console.ReadLine(); 28 | 29 | Console.WriteLine("Sent"); 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationHttpPackage/Program.cs: -------------------------------------------------------------------------------- 1 | using log4net; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace SimpleConsoleApplication 9 | { 10 | class Program 11 | { 12 | protected static readonly ILog log = LogManager.GetLogger(typeof(Program)); 13 | 14 | static void Main(string[] args) 15 | { 16 | log4net.Config.XmlConfigurator.Configure(); 17 | 18 | Console.WriteLine("Write a sentence, q to quit"); 19 | 20 | var text = Console.ReadLine(); 21 | 22 | while (text != "q") 23 | { 24 | log.Debug(String.Format("Randomizer Sentence: {0}", text)); 25 | Console.WriteLine("Sent {0}", text); 26 | 27 | text = Console.ReadLine(); 28 | 29 | Console.WriteLine("Sent"); 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplication/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("SimpleDotnetcoreConsoleApplication")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("b73d00f0-68d2-48bd-8383-67c89df15faa")] 20 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplicationUdpPackage/SimpleDotnetcoreConsoleApplicationUdpPackage.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | SimpleDotnetcoreConsoleApplicationUdpPackage 6 | Exe 7 | SimpleDotnetcoreConsoleApplicationUdpPackage 8 | false 9 | false 10 | false 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Always 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/RandomSentence/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplicationAmqpPackage/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("SimpleDotnetcoreConsoleApplicationAmqpPackage")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("08db026c-6da8-466d-a589-82663d30e19f")] 20 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplicationAmqpPackage/SimpleDotnetcoreConsoleApplicationAmqpPackage.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | SimpleDotnetcoreConsoleApplicationAmqpPackage 6 | Exe 7 | SimpleDotnetcoreConsoleApplicationAmqpPackage 8 | false 9 | false 10 | false 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Always 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplicationHttpPackage/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("SimpleDotnetcoreConsoleApplicationHttpPackage")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("667aa1b5-c157-40a1-8235-c8f3715ab6a1")] 20 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplicationUdpPackage/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("SimpleDotnetcoreConsoleApplicationUdpPackage")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("788821f6-197b-4e3f-a1d0-3b1cddaddbe5")] 20 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplication/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationCorePackage/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationLoggingEvent/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/JSNLogDemo_Log4Net/App_Start/JSNLogConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Routing; 3 | using System.Web.Mvc; 4 | 5 | [assembly: WebActivatorEx.PostApplicationStartMethod( 6 | typeof(JSNLogDemo_Log4Net.App_Start.JSNLogConfig), "PostStart")] 7 | 8 | namespace JSNLogDemo_Log4Net.App_Start { 9 | public static class JSNLogConfig { 10 | public static void PostStart() { 11 | // Insert a route that ignores the jsnlog.logger route. That way, 12 | // requests for jsnlog.logger will get through to the handler defined 13 | // in web.config. 14 | // 15 | // The route must take this particular form, including the constraint, 16 | // otherwise ActionLink will be confused by this route and generate the wrong URLs. 17 | 18 | var jsnlogRoute = new Route("{*jsnloglogger}", new StopRoutingHandler()); 19 | jsnlogRoute.Constraints = new RouteValueDictionary {{ "jsnloglogger", @"jsnlog\.logger(/.*)?" }}; 20 | RouteTable.Routes.Insert(0, jsnlogRoute); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/Log4NetLoggerProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Microsoft.Extensions.Logging; 4 | 5 | namespace SimpleDotnetcoreWebApplication 6 | { 7 | public class Log4NetProvider : ILoggerProvider 8 | { 9 | private IDictionary _loggers = new Dictionary(); 10 | 11 | public ILogger CreateLogger(string name) 12 | { 13 | if (!_loggers.ContainsKey(name)) 14 | { 15 | lock (_loggers) 16 | { 17 | // Have to check again since another thread may have gotten the lock first 18 | if (!_loggers.ContainsKey(name)) 19 | { 20 | _loggers[name] = new Log4NetAdapter(name); 21 | } 22 | } 23 | } 24 | return _loggers[name]; 25 | } 26 | 27 | public void Dispose() 28 | { 29 | _loggers.Clear(); 30 | _loggers = null; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/lib/jquery-validation/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-validation", 3 | "homepage": "http://jqueryvalidation.org/", 4 | "repository": { 5 | "type": "git", 6 | "url": "git://github.com/jzaefferer/jquery-validation.git" 7 | }, 8 | "authors": [ 9 | "Jörn Zaefferer " 10 | ], 11 | "description": "Form validation made easy", 12 | "main": "dist/jquery.validate.js", 13 | "keywords": [ 14 | "forms", 15 | "validation", 16 | "validate" 17 | ], 18 | "license": "MIT", 19 | "ignore": [ 20 | "**/.*", 21 | "node_modules", 22 | "bower_components", 23 | "test", 24 | "demo", 25 | "lib" 26 | ], 27 | "dependencies": { 28 | "jquery": ">= 1.7.2" 29 | }, 30 | "version": "1.14.0", 31 | "_release": "1.14.0", 32 | "_resolution": { 33 | "type": "version", 34 | "tag": "1.14.0", 35 | "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48" 36 | }, 37 | "_source": "git://github.com/jzaefferer/jquery-validation.git", 38 | "_target": ">=1.8", 39 | "_originalSource": "jquery-validation" 40 | } -------------------------------------------------------------------------------- /src/Gelf4Net.UdpAppender/Gelf4Net.UdpAppender.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | True 10 | 11 | 12 | 13 | True 14 | 15 | 16 | 17 | 18 | 19 | netstandard2.0;net462;net8.0 20 | GELF log4net UdpAppender - graylog2. Built for log4net 21 | true 22 | Gelf4Net.UdpAppender.snk 23 | 1.0.1.0 24 | 25 | LICENSE.md 26 | icon.png 27 | 28 | https://github.com/jjchiw/gelf4net 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplicationHttpPackage/SimpleDotnetcoreConsoleApplicationHttpPackage.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | SimpleDotnetcoreConsoleApplicationHttpPackage 6 | Exe 7 | SimpleDotnetcoreConsoleApplicationHttpPackage 8 | false 9 | false 10 | false 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | Always 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /examples/JSNLogDemo_Log4Net/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = null; 3 | } 4 | 5 | 6 | 7 | 8 | 9 | 10 | JSNLogDemo_Log4Net 11 | 12 | @Html.Raw(JSNLog.JavascriptLogging.Configure()) 13 | 14 | 15 | 16 | 17 |

JSNLogDemo_Log4Net

18 | 19 |

20 | Log messages are sent to server the moment this page is opened. 21 |

22 |

23 | The code generating the log messages is in scripts/jsnlogdemo.js. 24 |

25 |

26 | JSNLog sets the window.onerror handler when it loads, so uncaught JavaScript exceptions are sent to your server side log. 27 | However, it will only do that if window.onerror has not already been set 28 | (details). That way, if you are setting your own onerror handler, it won't override that. 29 |

30 | 31 | 32 | 33 |
34 |
35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/lib/bootstrap/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 4 | "keywords": [ 5 | "css", 6 | "js", 7 | "less", 8 | "mobile-first", 9 | "responsive", 10 | "front-end", 11 | "framework", 12 | "web" 13 | ], 14 | "homepage": "http://getbootstrap.com", 15 | "license": "MIT", 16 | "moduleType": "globals", 17 | "main": [ 18 | "less/bootstrap.less", 19 | "dist/js/bootstrap.js" 20 | ], 21 | "ignore": [ 22 | "/.*", 23 | "_config.yml", 24 | "CNAME", 25 | "composer.json", 26 | "CONTRIBUTING.md", 27 | "docs", 28 | "js/tests", 29 | "test-infra" 30 | ], 31 | "dependencies": { 32 | "jquery": "1.9.1 - 2" 33 | }, 34 | "version": "3.3.6", 35 | "_release": "3.3.6", 36 | "_resolution": { 37 | "type": "version", 38 | "tag": "v3.3.6", 39 | "commit": "81df608a40bf0629a1dc08e584849bb1e43e0b7a" 40 | }, 41 | "_source": "git://github.com/twbs/bootstrap.git", 42 | "_target": "3.3.6", 43 | "_originalSource": "bootstrap" 44 | } -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2015 - 2020 micahlmartin, jjchiw, contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/Log4NetAspExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Reflection; 3 | using System.Xml; 4 | using log4net.Config; 5 | using log4net.Repository; 6 | using Microsoft.AspNetCore.Hosting; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace SimpleDotnetcoreWebApplication 10 | { 11 | public static class Log4NetAspExtensions 12 | { 13 | public static void ConfigureLog4Net(this IWebHostEnvironment _) 14 | { 15 | var log4netConfig = new XmlDocument(); 16 | 17 | using (var reader = new StreamReader(new FileStream("log4net.config", FileMode.Open, FileAccess.Read))) 18 | { 19 | log4netConfig.Load(reader); 20 | } 21 | 22 | ILoggerRepository rep = log4net.LogManager.CreateRepository(Assembly.GetEntryAssembly(), typeof(log4net.Repository.Hierarchy.Hierarchy)); 23 | 24 | XmlConfigurator.Configure(rep, log4netConfig["log4net"]); 25 | } 26 | 27 | public static void AddLog4Net(this ILoggerFactory loggerFactory) 28 | { 29 | loggerFactory.AddProvider(new Log4NetProvider()); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /examples/RandomSentence/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SandboxWindow.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.Extensions.Logging; 3 | 4 | namespace SimpleDotnetcoreWebApplication.Controllers 5 | { 6 | public class HomeController : Controller 7 | { 8 | private ILogger _logger; 9 | 10 | public HomeController(ILogger logger) 11 | { 12 | _logger = logger; 13 | } 14 | 15 | public IActionResult Index() 16 | { 17 | _logger.LogDebug("Index"); 18 | return View(); 19 | } 20 | 21 | public IActionResult About() 22 | { 23 | _logger.LogDebug("About"); 24 | ViewData["Message"] = "Your application description page."; 25 | 26 | return View(); 27 | } 28 | 29 | public IActionResult Contact() 30 | { 31 | _logger.LogDebug("Contact"); 32 | ViewData["Message"] = "Your contact page."; 33 | 34 | return View(); 35 | } 36 | 37 | public IActionResult Error() 38 | { 39 | _logger.LogDebug("Error"); 40 | return View(); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2015 Twitter, Inc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /src/Gelf4Net.AmqpAppender/Gelf4Net.AmqpAppender.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | netstandard2.0;net462;net8.0 9 | GELF log4net AmqpAppender - graylog2. Built for log4net 10 | true 11 | Gelf4Net.AmqpAppender.snk 12 | 1.0.1.0 13 | 14 | LICENSE.md 15 | icon.png 16 | 17 | https://github.com/jjchiw/gelf4net 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | True 27 | 28 | 29 | 30 | True 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /examples/Backup/SimpleDotnetcoreConsoleApplication/SimpleDotnetcoreConsoleApplication.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | b73d00f0-68d2-48bd-8383-67c89df15faa 11 | SimpleDotnetcoreConsoleApplication 12 | .\obj 13 | .\bin\ 14 | v4.5.2 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Gelf4Net.Core/Gelf4Net.Core.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0;net462;net8.0 5 | GELF log4net core classes. 6 | true 7 | Gelf4Net.Core.snk 8 | 1.0.1.0 9 | 10 | LICENSE.md 11 | icon.png 12 | 13 | https://github.com/jjchiw/gelf4net 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | True 23 | 24 | 25 | 26 | True 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /examples/Backup/SimpleDotnetcoreConsoleApplicationAmqpPackage/SimpleDotnetcoreConsoleApplicationAmqpPackage.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 08db026c-6da8-466d-a589-82663d30e19f 11 | SimpleDotnetcoreConsoleApplicationAmqpPackage 12 | .\obj 13 | .\bin\ 14 | v4.5.2 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/Backup/SimpleDotnetcoreConsoleApplicationHttpPackage/SimpleDotnetcoreConsoleApplicationHttpPackage.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 667aa1b5-c157-40a1-8235-c8f3715ab6a1 11 | SimpleDotnetcoreConsoleApplicationHttpPackage 12 | .\obj 13 | .\bin\ 14 | v4.5.2 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/Backup/SimpleDotnetcoreConsoleApplicationUdpPackage/SimpleDotnetcoreConsoleApplicationUdpPackage.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 788821f6-197b-4e3f-a1d0-3b1cddaddbe5 11 | SimpleDotnetcoreConsoleApplicationUdpPackage 12 | .\obj 13 | .\bin\ 14 | v4.5.2 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/lib/jquery-validation-unobtrusive/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-validation-unobtrusive", 3 | "version": "3.2.6", 4 | "homepage": "https://github.com/aspnet/jquery-validation-unobtrusive", 5 | "description": "Add-on to jQuery Validation to enable unobtrusive validation options in data-* attributes.", 6 | "main": [ 7 | "jquery.validate.unobtrusive.js" 8 | ], 9 | "ignore": [ 10 | "**/.*", 11 | "*.json", 12 | "*.md", 13 | "*.txt", 14 | "gulpfile.js" 15 | ], 16 | "keywords": [ 17 | "jquery", 18 | "asp.net", 19 | "mvc", 20 | "validation", 21 | "unobtrusive" 22 | ], 23 | "authors": [ 24 | "Microsoft" 25 | ], 26 | "license": "http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm", 27 | "repository": { 28 | "type": "git", 29 | "url": "git://github.com/aspnet/jquery-validation-unobtrusive.git" 30 | }, 31 | "dependencies": { 32 | "jquery-validation": ">=1.8", 33 | "jquery": ">=1.8" 34 | }, 35 | "_release": "3.2.6", 36 | "_resolution": { 37 | "type": "version", 38 | "tag": "v3.2.6", 39 | "commit": "13386cd1b5947d8a5d23a12b531ce3960be1eba7" 40 | }, 41 | "_source": "git://github.com/aspnet/jquery-validation-unobtrusive.git", 42 | "_target": "3.2.6", 43 | "_originalSource": "jquery-validation-unobtrusive" 44 | } -------------------------------------------------------------------------------- /src/Gelf4Net.Core/Internals.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly:InternalsVisibleTo("Gelf4Net.HttpAppender,PublicKey="+ 4 | "0024000004800000940000000602000000240000525341310004000001000100fdf45e16663ef5" + 5 | "7377a711539a164da12ae2453e3cdb58f66819cb449f89009fe65005312dc0c7b800ff0c660c8c" + 6 | "6bf1d957283bc62a755dcb0f2fd096e923680c10da415fb96218d2c476dbe86442e094bf8d3b01" + 7 | "2e7561df65eed657fe703d180a035b8f565917c6c34a0c9e3de79a6585da56f12f5be1646b5fa7" + 8 | "bab529eb")] 9 | 10 | [assembly:InternalsVisibleTo("Gelf4Net.UdpAppender,PublicKey="+ 11 | "002400000480000094000000060200000024000052534131000400000100010009d35d67ec5195" + 12 | "03ccf16c2572622d7e82d1e8ed493685ee122c66fde6bf5e14848c7e9f460450f0f6afc0b10f25" + 13 | "dcb0e12725a2ab40f59cbc008dd9700cd4832430461b57eb78d026327074da3421bd47bcf54f9b" + 14 | "a62f11f4ad572f13afeeada2cdfef8079b6881548aa3e2b74e1392ffc57cda1b8d230caff32c23" + 15 | "6c0511bb")] 16 | 17 | [assembly:InternalsVisibleTo("Gelf4Net.AmqpAppender,PublicKey="+ 18 | "00240000048000009400000006020000002400005253413100040000010001009d75df029c76f6" + 19 | "b52586b5de6934fd0d2262909497e01ce5c2c67f61b0e2a3041b37eac40f25321a4fad994c7eaf" + 20 | "1ea77978f300828e587641bd5ac1eb3277816254247b3b5c94fd1fbdccb0bd5dd27a9b79d2ac76" + 21 | "23bb53d7dade42e9727bc94334e70573f0e26a2d5191f064023b625a26791ef7b9d526632bd4f2" + 22 | "e01377bb")] 23 | -------------------------------------------------------------------------------- /src/Gelf4Net.HttpAppender/Gelf4Net.HttpAppender.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | netstandard2.0;net462;net8.0 9 | GELF log4net HttpAppender - graylog2. Built for log4net 10 | true 11 | Gelf4Net.HttpAppender.snk 12 | 1.0.1.0 13 | 14 | LICENSE.md 15 | icon.png 16 | 17 | https://github.com/jjchiw/gelf4net 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | True 27 | 28 | 29 | 30 | True 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /examples/RandomSentence/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RandomSentence")] 9 | [assembly: AssemblyDescription("Sample")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("gelf4net")] 12 | [assembly: AssemblyProduct("gelf4net")] 13 | [assembly: AssemblyCopyright("Copyright © 2012")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e54c86e9-a7d2-407d-85de-cb1d46d7c583")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /examples/JSNLogDemo_Log4Net/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /examples/Backup/SimpleDotnetcoreWebApplication/SimpleDotnetcoreWebApplication.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | f4ebdf60-216c-48a9-b941-a3053e8283a9 10 | SimpleDotnetcoreWebApplication 11 | .\obj 12 | .\bin\ 13 | v4.5.2 14 | 15 | 16 | 2.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/Gelf4Net/Gelf4Net.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | True 12 | 13 | 14 | 15 | True 16 | 17 | 18 | 19 | 20 | 21 | 3.0.1.2 22 | 3.0.1.2 23 | netstandard2.0;net462;net8.0 24 | GELF log4net UdpAppender, AmqpAppender, HttpAppender - graylog2. Built for log4net 25 | 3.0.1.2 26 | 3.0.1.2 27 | true 28 | Gelf4Net.snk 29 | 30 | LICENSE.md 31 | https://github.com/jjchiw/gelf4net 32 | icon.png 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /examples/JSNLogDemo_Log4Net/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/Gelf4Net.HttpAppender/AsyncGelfHttpAppender.cs: -------------------------------------------------------------------------------- 1 | using Gelf4Net.Util; 2 | using log4net.Core; 3 | using System.Diagnostics; 4 | 5 | namespace Gelf4Net.Appender 6 | { 7 | public class AsyncGelfHttpAppender : GelfHttpAppender 8 | { 9 | private BufferedLogSender _sender; 10 | public int Threads { get; set; } 11 | public int BufferSize { get; set; } 12 | 13 | public override void ActivateOptions() 14 | { 15 | base.ActivateOptions(); 16 | 17 | var options = new BufferedSenderOptions 18 | { 19 | BufferSize = BufferSize, 20 | NumTasks = Threads 21 | }; 22 | 23 | _sender = new BufferedLogSender(options, SendMessageAsync, WaitToSendOnConnectionAsync, IsWaiting); 24 | } 25 | 26 | protected override void Append(LoggingEvent[] loggingEvents) 27 | { 28 | foreach (var loggingEvent in loggingEvents) 29 | { 30 | Append(loggingEvent); 31 | } 32 | } 33 | 34 | protected override void Append(LoggingEvent loggingEvent) 35 | { 36 | if (FilterEvent(loggingEvent)) 37 | { 38 | _sender.QueueSend(RenderLoggingEvent(loggingEvent)); 39 | } 40 | } 41 | 42 | protected override void OnClose() 43 | { 44 | Debug.WriteLine("[Gelf4Net] Closing Async Appender"); 45 | _sender.Stop(); 46 | base.OnClose(); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /examples/JSNLogDemo_Log4Net/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("JSNLogDemo_Log4Net")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("JSNLogDemo_Log4Net")] 13 | [assembly: AssemblyCopyright("Copyright ? 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("be76aa48-cd0f-4da1-aa89-f1eb25812f9a")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | 37 | 38 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplication/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SimpleConsoleApplication")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SimpleConsoleApplication")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("bea84491-b2ba-43f3-88d8-9182874aa6af")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationAmqpPackage/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SimpleConsoleApplication")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SimpleConsoleApplication")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("bea84491-b2ba-43f3-88d8-9182874aa6af")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationCorePackage/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SimpleConsoleApplication")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SimpleConsoleApplication")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("bea84491-b2ba-43f3-88d8-9182874aa6af")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationHttpPackage/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SimpleConsoleApplication")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SimpleConsoleApplication")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("bea84491-b2ba-43f3-88d8-9182874aa6af")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationUdpPackage/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SimpleConsoleApplication")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SimpleConsoleApplication")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("bea84491-b2ba-43f3-88d8-9182874aa6af")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/Gelf4Net.AmqpAppender/AsyncGelfAmqpAppender.cs: -------------------------------------------------------------------------------- 1 | using Gelf4Net.Util; 2 | using log4net.Core; 3 | using System; 4 | using System.Collections.Concurrent; 5 | using System.Diagnostics; 6 | using System.Threading; 7 | 8 | namespace Gelf4Net.Appender 9 | { 10 | public class AsyncGelfAmqpAppender : GelfAmqpAppender 11 | { 12 | private BufferedLogSender _sender; 13 | 14 | public int Threads { get; set; } 15 | public int BufferSize { get; set; } 16 | 17 | public override void ActivateOptions() 18 | { 19 | base.ActivateOptions(); 20 | 21 | var options = new BufferedSenderOptions 22 | { 23 | BufferSize = BufferSize, 24 | NumTasks = Threads, 25 | }; 26 | _sender = new BufferedLogSender(options, SendMessageAsync, WaitToSendOnConnectionAsync, IsWaiting); 27 | } 28 | 29 | protected override void Append(LoggingEvent[] loggingEvents) 30 | { 31 | foreach (var loggingEvent in loggingEvents) 32 | { 33 | Append(loggingEvent); 34 | } 35 | } 36 | 37 | protected override void Append(LoggingEvent loggingEvent) 38 | { 39 | if (FilterEvent(loggingEvent)) 40 | { 41 | _sender.QueueSend(this.RenderLoggingEvent(loggingEvent)); 42 | } 43 | } 44 | 45 | protected override void OnClose() 46 | { 47 | Debug.WriteLine("Closing Async Appender"); 48 | _sender.Stop(); 49 | base.OnClose(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Gelf4Net.UdpAppender/AsyncGelfUdpAppender.cs: -------------------------------------------------------------------------------- 1 | using Gelf4Net.Util; 2 | using log4net.Core; 3 | using System; 4 | using System.Collections.Concurrent; 5 | using System.Diagnostics; 6 | using System.Threading; 7 | 8 | namespace Gelf4Net.Appender 9 | { 10 | public class AsyncGelfUdpAppender : GelfUdpAppender 11 | { 12 | private BufferedLogSender _sender; 13 | public int Threads { get; set; } 14 | public int BufferSize { get; set; } 15 | 16 | public override void ActivateOptions() 17 | { 18 | base.ActivateOptions(); 19 | 20 | var options = new BufferedSenderOptions 21 | { 22 | BufferSize = BufferSize, 23 | NumTasks = Threads 24 | }; 25 | 26 | _sender = new BufferedLogSender(options, SendMessageAsync, WaitToSendOnConnectionAsync, IsWaiting); 27 | } 28 | 29 | protected override void Append(LoggingEvent[] loggingEvents) 30 | { 31 | foreach (var loggingEvent in loggingEvents) 32 | { 33 | Append(loggingEvent); 34 | } 35 | } 36 | 37 | protected override void Append(LoggingEvent loggingEvent) 38 | { 39 | if (FilterEvent(loggingEvent)) 40 | { 41 | _sender.QueueSend(RenderLoggingEvent(loggingEvent)); 42 | } 43 | } 44 | 45 | protected override void OnClose() 46 | { 47 | Debug.WriteLine("[Gelf4Net] Closing Async Appender"); 48 | _sender.Stop(); 49 | base.OnClose(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplication/Program.cs: -------------------------------------------------------------------------------- 1 | using log4net; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading; 8 | using System.Threading.Tasks; 9 | 10 | namespace SimpleConsoleApplication 11 | { 12 | internal class Program 13 | { 14 | protected static readonly ILog log = LogManager.GetLogger(typeof(Program)); 15 | 16 | private static void Main(string[] args) 17 | { 18 | var stop = new Stopwatch(); 19 | stop.Start(); 20 | log4net.Config.XmlConfigurator.Configure(); 21 | stop.Stop(); 22 | Console.WriteLine(string.Format("Time elapsed configuration {0}", stop.ElapsedMilliseconds)); 23 | 24 | Console.WriteLine("Write a sentence, q to quit"); 25 | 26 | var text = Console.ReadLine(); 27 | 28 | while (text != "q") 29 | { 30 | stop.Start(); 31 | //log.Debug(String.Format("Randomizer Sentence: {0}", text)); 32 | log.Debug(new 33 | { 34 | Message = String.Format("Randomizer Sentence: {0}", text), 35 | Open = DateTime.UtcNow 36 | }); 37 | stop.Stop(); 38 | Console.WriteLine(string.Format("Time elapsed configuration {0}", stop.ElapsedMilliseconds)); 39 | Console.WriteLine("Sent {0}", text); 40 | 41 | text = Console.ReadLine(); 42 | 43 | Console.WriteLine("Sent"); 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationLoggingEvent/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SimpleConsoleApplicationLoggingEvent")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SimpleConsoleApplicationLoggingEvent")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("bb7437a6-cae6-4d15-80bd-cb7843bfce6c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplication/Program.cs: -------------------------------------------------------------------------------- 1 | using log4net; 2 | using log4net.Config; 3 | using log4net.Repository; 4 | using System; 5 | using System.IO; 6 | using System.Reflection; 7 | using System.Xml; 8 | 9 | namespace SimpleDotnetcoreConsoleApplication 10 | { 11 | public class Program 12 | { 13 | protected static readonly ILog log = LogManager.GetLogger(typeof(Program)); 14 | 15 | private static void Main(string[] args) 16 | { 17 | XmlDocument log4netConfig = new XmlDocument(); 18 | using (StreamReader reader = new StreamReader(new FileStream("log4net.config", FileMode.Open, FileAccess.Read))) 19 | { 20 | log4netConfig.Load(reader); 21 | } 22 | 23 | ILoggerRepository rep = log4net.LogManager.CreateRepository(Assembly.GetEntryAssembly(), typeof(log4net.Repository.Hierarchy.Hierarchy)); 24 | 25 | XmlConfigurator.Configure(rep, log4netConfig["log4net"]); 26 | 27 | Console.WriteLine("Write a sentence, q to quit"); 28 | 29 | var text = Console.ReadLine(); 30 | 31 | while (text != "q") 32 | { 33 | //log.Debug(String.Format("Randomizer Sentence: {0}", text)); 34 | log.Debug(new 35 | { 36 | Message = String.Format("Randomizer Sentence: {0}", text), 37 | Open = DateTime.UtcNow 38 | }); 39 | Console.WriteLine("Sent {0}", text); 40 | 41 | text = Console.ReadLine(); 42 | 43 | Console.WriteLine("Sent"); 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplicationAmqpPackage/Program.cs: -------------------------------------------------------------------------------- 1 | using log4net; 2 | using log4net.Config; 3 | using log4net.Repository; 4 | using System; 5 | using System.IO; 6 | using System.Reflection; 7 | using System.Xml; 8 | 9 | namespace SimpleDotnetcoreConsoleApplicationAmqpPackage 10 | { 11 | public class Program 12 | { 13 | protected static readonly ILog log = LogManager.GetLogger(typeof(Program)); 14 | 15 | private static void Main(string[] args) 16 | { 17 | XmlDocument log4netConfig = new XmlDocument(); 18 | using (StreamReader reader = new StreamReader(new FileStream("log4net.config", FileMode.Open, FileAccess.Read))) 19 | { 20 | log4netConfig.Load(reader); 21 | } 22 | 23 | ILoggerRepository rep = log4net.LogManager.CreateRepository(Assembly.GetEntryAssembly(), typeof(log4net.Repository.Hierarchy.Hierarchy)); 24 | 25 | XmlConfigurator.Configure(rep, log4netConfig["log4net"]); 26 | 27 | Console.WriteLine("Write a sentence, q to quit"); 28 | 29 | var text = Console.ReadLine(); 30 | 31 | while (text != "q") 32 | { 33 | //log.Debug(String.Format("Randomizer Sentence: {0}", text)); 34 | log.Debug(new 35 | { 36 | Message = String.Format("Randomizer Sentence: {0}", text), 37 | Open = DateTime.UtcNow 38 | }); 39 | Console.WriteLine("Sent {0}", text); 40 | 41 | text = Console.ReadLine(); 42 | 43 | Console.WriteLine("Sent"); 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplicationHttpPackage/Program.cs: -------------------------------------------------------------------------------- 1 | using log4net; 2 | using log4net.Config; 3 | using log4net.Repository; 4 | using System; 5 | using System.IO; 6 | using System.Reflection; 7 | using System.Xml; 8 | 9 | namespace SimpleDotnetcoreConsoleApplicationHttpPackage 10 | { 11 | public class Program 12 | { 13 | protected static readonly ILog log = LogManager.GetLogger(typeof(Program)); 14 | 15 | private static void Main(string[] args) 16 | { 17 | XmlDocument log4netConfig = new XmlDocument(); 18 | using (StreamReader reader = new StreamReader(new FileStream("log4net.config", FileMode.Open, FileAccess.Read))) 19 | { 20 | log4netConfig.Load(reader); 21 | } 22 | 23 | ILoggerRepository rep = log4net.LogManager.CreateRepository(Assembly.GetEntryAssembly(), typeof(log4net.Repository.Hierarchy.Hierarchy)); 24 | 25 | XmlConfigurator.Configure(rep, log4netConfig["log4net"]); 26 | 27 | Console.WriteLine("Write a sentence, q to quit"); 28 | 29 | var text = Console.ReadLine(); 30 | 31 | while (text != "q") 32 | { 33 | //log.Debug(String.Format("Randomizer Sentence: {0}", text)); 34 | log.Debug(new 35 | { 36 | Message = String.Format("Randomizer Sentence: {0}", text), 37 | Open = DateTime.UtcNow 38 | }); 39 | Console.WriteLine("Sent {0}", text); 40 | 41 | text = Console.ReadLine(); 42 | 43 | Console.WriteLine("Sent"); 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplicationUdpPackage/Program.cs: -------------------------------------------------------------------------------- 1 | using log4net; 2 | using log4net.Config; 3 | using log4net.Repository; 4 | using System; 5 | using System.IO; 6 | using System.Reflection; 7 | using System.Xml; 8 | 9 | namespace SimpleDotnetcoreConsoleApplicationUdpPackage 10 | { 11 | public class Program 12 | { 13 | protected static readonly ILog log = LogManager.GetLogger(typeof(Program)); 14 | 15 | private static void Main(string[] args) 16 | { 17 | XmlDocument log4netConfig = new XmlDocument(); 18 | using (StreamReader reader = new StreamReader(new FileStream("log4net.config", FileMode.Open, FileAccess.Read))) 19 | { 20 | log4netConfig.Load(reader); 21 | } 22 | 23 | ILoggerRepository rep = log4net.LogManager.CreateRepository(Assembly.GetEntryAssembly(), typeof(log4net.Repository.Hierarchy.Hierarchy)); 24 | 25 | XmlConfigurator.Configure(rep, log4netConfig["log4net"]); 26 | 27 | Console.WriteLine("Write a sentence, q to quit"); 28 | 29 | var text = Console.ReadLine(); 30 | 31 | while (text != "q") 32 | { 33 | //log.Debug(String.Format("Randomizer Sentence: {0}", text)); 34 | log.Debug(new 35 | { 36 | Message = String.Format("Randomizer Sentence: {0}", text), 37 | Open = DateTime.UtcNow 38 | }); 39 | Console.WriteLine("Sent {0}", text); 40 | 41 | text = Console.ReadLine(); 42 | 43 | Console.WriteLine("Sent"); 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/lib/jquery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/jquery 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | All files located in the node_modules and external directories are 34 | externally maintained libraries used by this software which have their 35 | own licenses; we recommend you read them, as their terms may differ from 36 | the terms above. 37 | -------------------------------------------------------------------------------- /src/Gelf4Net.Core/Util/TypeConverters/IPAddressConverter.cs: -------------------------------------------------------------------------------- 1 | using log4net.Util.TypeConverters; 2 | using System; 3 | using System.Net; 4 | 5 | namespace Gelf4Net.Util.TypeConverters 6 | { 7 | /// 8 | /// The built-in IPAddressConverter in log4net does not perform well and errors out unecessarily when parsing external IP address. 9 | /// This converter tries to parse the IP first and doesn't care if it actually exists or has a valid host entry. 10 | /// 11 | public class IPAddressConverter : IConvertFrom 12 | { 13 | public bool CanConvertFrom(Type sourceType) 14 | { 15 | return sourceType == typeof(string); 16 | } 17 | 18 | public object ConvertFrom(object source) 19 | { 20 | string hostNameOrAddress = source as string; 21 | if (hostNameOrAddress != null && hostNameOrAddress.Length > 0) 22 | { 23 | try 24 | { 25 | IPAddress address = null; 26 | 27 | if (!IPAddress.TryParse(hostNameOrAddress, out address)) 28 | { 29 | var task = Dns.GetHostEntryAsync(hostNameOrAddress); 30 | IPHostEntry hostEntry = task.Result; 31 | if (hostEntry != null && hostEntry.AddressList != null && hostEntry.AddressList.Length > 0 && hostEntry.AddressList[0] != null) 32 | address = hostEntry.AddressList[0]; 33 | } 34 | 35 | return address; 36 | } 37 | catch (Exception ex) 38 | { 39 | throw ConversionNotSupportedException.Create(typeof(IPAddress), source, ex); 40 | } 41 | } 42 | throw ConversionNotSupportedException.Create(typeof(IPAddress), source); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/SimpleDotnetcoreWebApplication.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | true 6 | SimpleDotnetcoreWebApplication 7 | Exe 8 | SimpleDotnetcoreWebApplication 9 | 10 | 11 | 12 | 13 | PreserveNewest 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplicationUdpPackage/log4net.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationLoggingEvent/Program.cs: -------------------------------------------------------------------------------- 1 | using log4net; 2 | using log4net.Core; 3 | using Newtonsoft.Json; 4 | using System; 5 | using System.Linq; 6 | 7 | namespace SimpleConsoleApplicationLoggingEvent 8 | { 9 | class Program 10 | { 11 | protected static readonly ILog log = LogManager.GetLogger(typeof(Program)); 12 | 13 | static void Main(string[] args) 14 | { 15 | log4net.Config.XmlConfigurator.Configure(); 16 | 17 | Console.WriteLine("Write a sentence, q to quit"); 18 | 19 | var text = Console.ReadLine(); 20 | 21 | while (text != "q") 22 | { 23 | var loggingEventDataCC = new LoggingEventData 24 | { 25 | Message = text, 26 | LoggerName = "Test.Logger.Class", 27 | Level = Level.Debug, 28 | TimeStamp = DateTime.Now 29 | }; 30 | var loggingEventCC = new LoggingEvent(loggingEventDataCC); 31 | 32 | 33 | var loggingEventData = new LoggingEventData 34 | { 35 | Message = JsonConvert.SerializeObject(new { Message = text, Open = DateTime.UtcNow }), 36 | LoggerName = "Test.Logger.Class", 37 | Level = Level.Debug, 38 | TimeStamp = DateTime.Now 39 | }; 40 | var loggingEvent = new LoggingEvent(loggingEventData); 41 | 42 | var gelfCC = LogManager.GetRepository().GetAppenders().FirstOrDefault(x => x.Name == "GelfUdpAppenderCC"); 43 | var gelf = LogManager.GetRepository().GetAppenders().FirstOrDefault(x => x.Name == "GelfUdpAppender"); 44 | 45 | gelf.DoAppend(loggingEvent); 46 | gelfCC.DoAppend(loggingEventCC); 47 | 48 | text = Console.ReadLine(); 49 | 50 | Console.WriteLine("Sent"); 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /examples/JSNLogDemo_Log4Net/Views/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationLoggingEvent/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /examples/Backup/SimpleDotnetcoreWebApplication/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.NETCore.App": { 4 | "version": "1.0.1", 5 | "type": "platform" 6 | }, 7 | "Microsoft.ApplicationInsights.AspNetCore": "1.0.0", 8 | "Microsoft.AspNetCore.Diagnostics": "1.0.0", 9 | "Microsoft.AspNetCore.Mvc": "1.0.1", 10 | "Microsoft.AspNetCore.Razor.Tools": { 11 | "version": "1.0.0-preview2-final", 12 | "type": "build" 13 | }, 14 | "Microsoft.AspNetCore.Routing": "1.0.1", 15 | "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", 16 | "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", 17 | "Microsoft.AspNetCore.StaticFiles": "1.0.0", 18 | "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", 19 | "Microsoft.Extensions.Configuration.Json": "1.0.0", 20 | "Microsoft.Extensions.Logging": "1.0.0", 21 | "Microsoft.Extensions.Logging.Console": "1.0.0", 22 | "Microsoft.Extensions.Logging.Debug": "1.0.0", 23 | "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0", 24 | "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0", 25 | "Gelf4Net": "3.0.0.2" 26 | }, 27 | 28 | "tools": { 29 | "BundlerMinifier.Core": "2.0.238", 30 | "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final", 31 | "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" 32 | }, 33 | 34 | "frameworks": { 35 | "netcoreapp1.0": { 36 | "imports": [ 37 | "dotnet5.6", 38 | "portable-net45+win8" 39 | ] 40 | } 41 | }, 42 | 43 | "buildOptions": { 44 | "emitEntryPoint": true, 45 | "preserveCompilationContext": true 46 | }, 47 | 48 | "runtimeOptions": { 49 | "configProperties": { 50 | "System.GC.Server": true 51 | } 52 | }, 53 | 54 | "publishOptions": { 55 | "include": [ 56 | "wwwroot", 57 | "**/*.cshtml", 58 | "appsettings.json", 59 | "web.config" 60 | ] 61 | }, 62 | 63 | "scripts": { 64 | "prepublish": [ "bower install", "dotnet bundle" ], 65 | "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplicationHttpPackage/log4net.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreConsoleApplicationAmqpPackage/log4net.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/Log4NetAdapter.cs: -------------------------------------------------------------------------------- 1 | using log4net; 2 | using Microsoft.Extensions.Logging; 3 | using System; 4 | 5 | namespace SimpleDotnetcoreWebApplication 6 | { 7 | public class Log4NetAdapter : ILogger 8 | { 9 | private ILog _logger; 10 | 11 | public Log4NetAdapter(string loggerName) 12 | { 13 | _logger = LogManager.GetLogger(typeof(Log4NetAdapter)); 14 | } 15 | 16 | public IDisposable BeginScope(TState state) 17 | { 18 | return null; 19 | } 20 | 21 | public bool IsEnabled(LogLevel logLevel) 22 | { 23 | switch (logLevel) 24 | { 25 | case LogLevel.Debug: 26 | return _logger.IsDebugEnabled; 27 | case LogLevel.Information: 28 | return _logger.IsInfoEnabled; 29 | case LogLevel.Warning: 30 | return _logger.IsWarnEnabled; 31 | case LogLevel.Error: 32 | return _logger.IsErrorEnabled; 33 | case LogLevel.Critical: 34 | return _logger.IsFatalEnabled; 35 | default: 36 | throw new ArgumentException($"Unknown log level {logLevel}.", nameof(logLevel)); 37 | } 38 | } 39 | 40 | public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter) 41 | { 42 | if (!IsEnabled(logLevel)) 43 | { 44 | return; 45 | } 46 | string message = null; 47 | if (null != formatter) 48 | { 49 | message = formatter(state, exception); 50 | } 51 | else 52 | { 53 | throw new ArgumentNullException(nameof(formatter)); 54 | } 55 | switch (logLevel) 56 | { 57 | case LogLevel.Debug: 58 | _logger.Debug(message, exception); 59 | break; 60 | case LogLevel.Information: 61 | _logger.Info(message, exception); 62 | break; 63 | case LogLevel.Warning: 64 | _logger.Warn(message, exception); 65 | break; 66 | case LogLevel.Error: 67 | _logger.Error(message, exception); 68 | break; 69 | case LogLevel.Critical: 70 | _logger.Fatal(message, exception); 71 | break; 72 | default: 73 | _logger.Warn($"Encountered unknown log level {logLevel}, writing out as Info."); 74 | _logger.Info(message, exception); 75 | break; 76 | } 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.Extensions.Configuration; 4 | using Microsoft.Extensions.DependencyInjection; 5 | using Microsoft.Extensions.Hosting; 6 | using Microsoft.Extensions.Logging; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Threading.Tasks; 11 | 12 | namespace SimpleDotnetcoreWebApplication 13 | { 14 | public class Startup 15 | { 16 | public Startup(IWebHostEnvironment env) 17 | { 18 | var builder = new ConfigurationBuilder() 19 | .SetBasePath(env.ContentRootPath) 20 | .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) 21 | .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) 22 | .AddEnvironmentVariables(); 23 | 24 | if (env.IsDevelopment()) 25 | { 26 | // This will push telemetry data through Application Insights pipeline faster, allowing you to view results immediately. 27 | builder.AddApplicationInsightsSettings(developerMode: true); 28 | } 29 | 30 | Configuration = builder.Build(); 31 | } 32 | 33 | public IConfigurationRoot Configuration { get; } 34 | 35 | // This method gets called by the runtime. Use this method to add services to the container. 36 | public void ConfigureServices(IServiceCollection services) 37 | { 38 | // Add framework services. 39 | services.AddApplicationInsightsTelemetry(Configuration); 40 | 41 | services.AddControllersWithViews(); 42 | } 43 | 44 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 45 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) 46 | { 47 | //loggerFactory.AddDebug(); 48 | loggerFactory.AddLog4Net("log4net.config"); 49 | 50 | if (env.IsDevelopment()) 51 | { 52 | app.UseDeveloperExceptionPage(); 53 | } 54 | else 55 | { 56 | app.UseExceptionHandler("/Home/Error"); 57 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 58 | app.UseHsts(); 59 | } 60 | app.UseHttpsRedirection(); 61 | app.UseStaticFiles(); 62 | 63 | app.UseRouting(); 64 | 65 | app.UseAuthorization(); 66 | 67 | app.UseEndpoints(endpoints => 68 | { 69 | endpoints.MapControllerRoute( 70 | name: "default", 71 | pattern: "{controller=Home}/{action=Index}/{id?}"); 72 | }); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /examples/RandomSentence/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SandboxWindow.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SandboxWindow.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationUdpPackage/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/Gelf4Net.HttpAppender/GelfHttpAppender.cs: -------------------------------------------------------------------------------- 1 | using log4net.Appender; 2 | using log4net.Core; 3 | using System; 4 | using System.Net.Http; 5 | using System.Text; 6 | using System.Threading; 7 | using System.Threading.Tasks; 8 | 9 | namespace Gelf4Net.Appender 10 | { 11 | public class GelfHttpAppender : AppenderSkeleton 12 | { 13 | private readonly HttpClient _httpClient; 14 | private TimeSpan _bootTimeoutTimeSpan; 15 | private bool _shouldWaitBootTimeout = false; 16 | private bool _isWatingBootTimeout = false; 17 | private Uri _baseUrl; 18 | public string Url { get; set; } 19 | public string User { get; set; } 20 | public string Password { get; set; } 21 | public int RetryAfterMilliseconds { get; set; } = 5000; 22 | public int HttpClientTimeoutMilliseconds { get; set; } = 5000; 23 | 24 | public GelfHttpAppender() 25 | { 26 | _httpClient = new HttpClient(); 27 | } 28 | 29 | public override void ActivateOptions() 30 | { 31 | base.ActivateOptions(); 32 | 33 | _baseUrl = new Uri(Url); 34 | 35 | _httpClient.DefaultRequestHeaders.ExpectContinue = false; 36 | _httpClient.Timeout = TimeSpan.FromMilliseconds(HttpClientTimeoutMilliseconds); 37 | 38 | if (!string.IsNullOrEmpty(User) && !string.IsNullOrEmpty(Password)) 39 | { 40 | var byteArray = Encoding.ASCII.GetBytes(User + ":" + Password); 41 | _httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray)); 42 | } 43 | 44 | _bootTimeoutTimeSpan = TimeSpan.FromMilliseconds(RetryAfterMilliseconds); 45 | } 46 | 47 | protected override void Append(LoggingEvent loggingEvent) 48 | { 49 | var payload = RenderLoggingEvent(loggingEvent); 50 | var _ = SendMessageAsync(payload); 51 | } 52 | 53 | protected async Task SendMessageAsync(string payload) 54 | { 55 | try 56 | { 57 | using (var content = new ByteArrayContent(payload.GzipMessage(Encoding.UTF8))) 58 | { 59 | content.Headers.ContentEncoding.Add("gzip"); 60 | await _httpClient.PostAsync(_baseUrl, content).ConfigureAwait(false); 61 | _shouldWaitBootTimeout = false; 62 | return true; 63 | } 64 | } 65 | catch (Exception e) 66 | { 67 | _shouldWaitBootTimeout = true; 68 | ErrorHandler.Error("Unable to send logging event to remote host " + Url, e); 69 | return false; 70 | } 71 | } 72 | 73 | protected async Task WaitToSendOnConnectionAsync() 74 | { 75 | if (_shouldWaitBootTimeout) 76 | { 77 | _isWatingBootTimeout = true; 78 | await Task.Delay(_bootTimeoutTimeSpan); 79 | _shouldWaitBootTimeout = false; 80 | _isWatingBootTimeout = false; 81 | } 82 | } 83 | 84 | protected bool IsWaiting() => _isWatingBootTimeout; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationCorePackage/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewData["Title"] - SimpleDotnetcoreWebApplication 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 40 |
41 | @RenderBody() 42 |
43 |
44 |

© 2017 - SimpleDotnetcoreWebApplication

45 |
46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 58 | 62 | 63 | 64 | 65 | @RenderSection("scripts", required: false) 66 | 67 | 68 | -------------------------------------------------------------------------------- /examples/RandomSentence/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SandboxWindow { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SandboxWindow.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap SeamlessMetal { 67 | get { 68 | object obj = ResourceManager.GetObject("SeamlessMetal", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /test/Gelf4net.Tests/GelfUdpAppenderTests.cs: -------------------------------------------------------------------------------- 1 | using Gelf4Net.Appender; 2 | using NUnit.Framework; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | using NUnit.Framework.Legacy; 7 | 8 | namespace Gelf4Net.Tests.Appender 9 | { 10 | /// 11 | /// Summary description for UnitTest1 12 | /// 13 | [TestFixture] 14 | public class GelfUdpAppenderTest 15 | { 16 | [Test] 17 | public void GenerateMessageId_TestLength() 18 | { 19 | const int expectedLength = 8; 20 | var actual = GelfUdpAppender.GenerateMessageId(); 21 | ClassicAssert.AreEqual(actual.Length, expectedLength); 22 | } 23 | 24 | [Test] 25 | public void GenerateMessageId_NoCollision() 26 | { 27 | // Arrange 28 | int maxIterations = 10000; 29 | var generatedIds = new Dictionary(); 30 | 31 | // Act 32 | for (var i = 0; i < maxIterations; i++) 33 | { 34 | var id = BitConverter.ToInt64(GelfUdpAppender.GenerateMessageId(), 0); 35 | generatedIds.Add(id, id); 36 | } 37 | 38 | // Assert 39 | ClassicAssert.That(generatedIds.Count, Is.EqualTo(maxIterations)); 40 | } 41 | 42 | [Test] 43 | public void CreateChunkedMessagePart_StartsWithCorrectHeader() 44 | { 45 | // Arrange 46 | byte[] messageId = Encoding.UTF8.GetBytes("A1B2C3D4"); 47 | int index = 1; 48 | int chunkCount = 1; 49 | 50 | // Act 51 | byte[] result = GelfUdpAppender.CreateChunkedMessagePart(messageId, index, chunkCount); 52 | 53 | // Assert 54 | ClassicAssert.That(result[0], Is.EqualTo(30)); 55 | ClassicAssert.That(result[1], Is.EqualTo(15)); 56 | } 57 | 58 | [Test] 59 | public void CreateChunkedMessagePart_ContainsMessageId() 60 | { 61 | // Arrange 62 | byte[] messageId = Encoding.UTF8.GetBytes("A1B2C3D4"); 63 | int index = 1; 64 | int chunkCount = 1; 65 | 66 | // Act 67 | byte[] result = GelfUdpAppender.CreateChunkedMessagePart(messageId, index, chunkCount); 68 | 69 | // Assert 70 | ClassicAssert.That(result[2], Is.EqualTo((int)'A')); 71 | ClassicAssert.That(result[3], Is.EqualTo((int)'1')); 72 | ClassicAssert.That(result[4], Is.EqualTo((int)'B')); 73 | ClassicAssert.That(result[5], Is.EqualTo((int)'2')); 74 | ClassicAssert.That(result[6], Is.EqualTo((int)'C')); 75 | ClassicAssert.That(result[7], Is.EqualTo((int)'3')); 76 | ClassicAssert.That(result[8], Is.EqualTo((int)'D')); 77 | ClassicAssert.That(result[9], Is.EqualTo((int)'4')); 78 | } 79 | 80 | [Test] 81 | public void CreateChunkedMessagePart_EndsWithIndexAndCount() 82 | { 83 | // Arrange 84 | byte[] messageId = Encoding.UTF8.GetBytes("A1B2C3D4"); 85 | int index = 1; 86 | int chunkCount = 2; 87 | 88 | // Act 89 | byte[] result = GelfUdpAppender.CreateChunkedMessagePart(messageId, index, chunkCount); 90 | 91 | // Assert 92 | ClassicAssert.That(result[10], Is.EqualTo(index)); 93 | ClassicAssert.That(result[11], Is.EqualTo(chunkCount)); 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/Gelf4Net.Core/Extensions.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using Newtonsoft.Json.Linq; 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.ComponentModel; 7 | using System.IO; 8 | using System.IO.Compression; 9 | using System.Text; 10 | 11 | namespace Gelf4Net 12 | { 13 | public static class Extensions 14 | { 15 | private static HashSet _numericTypes = new HashSet 16 | { 17 | typeof(decimal), 18 | typeof(double), 19 | typeof(float), 20 | typeof(int), 21 | typeof(uint), 22 | typeof(long), 23 | typeof(ulong), 24 | typeof(short), 25 | typeof(ushort) 26 | }; 27 | 28 | public static bool IsNumeric(this Type type) 29 | { 30 | return _numericTypes.Contains(type); 31 | } 32 | 33 | public static IDictionary ToDictionary(this object values) 34 | { 35 | var dict = new Dictionary(StringComparer.OrdinalIgnoreCase); 36 | 37 | if (values != null) 38 | { 39 | foreach (PropertyDescriptor propertyDescriptor in TypeDescriptor.GetProperties(values)) 40 | { 41 | object obj = propertyDescriptor.GetValue(values); 42 | dict.Add(propertyDescriptor.Name, obj); 43 | } 44 | } 45 | 46 | return dict; 47 | } 48 | 49 | /// 50 | /// Truncate the message 51 | /// 52 | public static string TruncateMessage(this string message, int length) 53 | { 54 | return (message.Length > length) 55 | ? message.Substring(0, length - 1) 56 | : message; 57 | } 58 | 59 | public static bool ValidateJSON(this string s) 60 | { 61 | try 62 | { 63 | JToken.Parse(s); 64 | return true; 65 | } 66 | catch 67 | { 68 | return false; 69 | } 70 | } 71 | 72 | public static object ToJson(this string s) 73 | { 74 | return JsonConvert.DeserializeObject(s); 75 | } 76 | 77 | /// 78 | /// Gzips a string 79 | /// 80 | public static byte[] GzipMessage(this string message, Encoding encoding) 81 | { 82 | byte[] buffer = encoding.GetBytes(message); 83 | var ms = new MemoryStream(); 84 | using (var zip = new GZipStream(ms, CompressionMode.Compress, true)) 85 | { 86 | zip.Write(buffer, 0, buffer.Length); 87 | } 88 | ms.Position = 0; 89 | byte[] compressed = new byte[ms.Length]; 90 | ms.Read(compressed, 0, compressed.Length); 91 | return compressed; 92 | } 93 | 94 | public static double ToUnixTimestamp(this DateTime d) 95 | { 96 | var duration = d.ToUniversalTime() - new DateTime(1970, 1, 1, 0, 0, 0); 97 | 98 | return duration.TotalSeconds; 99 | } 100 | 101 | public static DateTime FromUnixTimestamp(this double d) 102 | { 103 | var datetime = new DateTime(1970, 1, 1, 0, 0, 0).AddMilliseconds(d * 1000).ToLocalTime(); 104 | 105 | return datetime; 106 | } 107 | } 108 | } -------------------------------------------------------------------------------- /examples/JSNLogDemo_Log4Net/Logs/log.txt.2017-02-28: -------------------------------------------------------------------------------- 1 | 2017-02-28 22:14:42,528 | INFO | serverlogger | info server log message 2 | 2017-02-28 22:14:52,738 | WARN | jsLogger | {"msg":"warn client log message - logging object","x":5,"y":88} 3 | 2017-02-28 22:14:52,739 | FATAL | jsLogger | fatal client log message 4 | 2017-02-28 22:14:52,739 | ERROR | jsLogger | error client log message - returned by function 5 | 2017-02-28 22:14:52,749 | DEBUG | jsLogger | debug client log message 6 | 2017-02-28 22:14:52,748 | FATAL | ClientRoot | {"stack":"ReferenceError: 'xyz' is undefined\n at Global code (http://localhost:54823/scripts/jsnlogdemo.js:14:2)","message":"'xyz' is undefined","name":"ReferenceError","logData":"Something went wrong!"} 7 | 2017-02-28 22:14:53,920 | INFO | jsLogger | info client log message 8 | 2017-02-28 22:14:55,235 | FATAL | onerrorLogger | {"msg":"Uncaught Exception","errorMsg":"'xyz2' is undefined","url":"http://localhost:54823/scripts/jsnlogdemo.js","line number":21,"column":1} 9 | 2017-02-28 22:15:25,851 | INFO | serverlogger | info server log message 10 | 2017-02-28 22:15:26,789 | DEBUG | jsLogger | debug client log message 11 | 2017-02-28 22:15:26,792 | FATAL | ClientRoot | {"stack":"ReferenceError: 'xyz' is undefined\n at Global code (http://localhost:54823/scripts/jsnlogdemo.js:14:2)","message":"'xyz' is undefined","name":"ReferenceError","logData":"Something went wrong!"} 12 | 2017-02-28 22:15:26,802 | ERROR | jsLogger | error client log message - returned by function 13 | 2017-02-28 22:15:27,503 | FATAL | onerrorLogger | {"msg":"Uncaught Exception","errorMsg":"'xyz2' is undefined","url":"http://localhost:54823/scripts/jsnlogdemo.js","line number":21,"column":1} 14 | 2017-02-28 22:15:27,307 | WARN | jsLogger | {"msg":"warn client log message - logging object","x":5,"y":88} 15 | 2017-02-28 22:15:27,453 | FATAL | jsLogger | fatal client log message 16 | 2017-02-28 22:15:28,239 | INFO | jsLogger | info client log message 17 | 2017-02-28 22:25:27,614 | INFO | serverlogger | info server log message 18 | 2017-02-28 22:26:21,791 | DEBUG | jsLogger | debug client log message 19 | 2017-02-28 22:26:21,830 | WARN | jsLogger | {"msg":"warn client log message - logging object","x":5,"y":88} 20 | 2017-02-28 22:26:21,834 | FATAL | ClientRoot | {"stack":"ReferenceError: 'xyz' is undefined\n at Global code (http://localhost:54823/scripts/jsnlogdemo.js:14:2)","message":"'xyz' is undefined","name":"ReferenceError","logData":"Something went wrong!"} 21 | 2017-02-28 22:26:21,852 | INFO | jsLogger | info client log message 22 | 2017-02-28 22:26:21,835 | FATAL | jsLogger | fatal client log message 23 | 2017-02-28 22:26:26,651 | ERROR | jsLogger | error client log message - returned by function 24 | 2017-02-28 22:26:29,963 | FATAL | onerrorLogger | {"msg":"Uncaught Exception","errorMsg":"'xyz2' is undefined","url":"http://localhost:54823/scripts/jsnlogdemo.js","line number":21,"column":1} 25 | 2017-02-28 22:59:25,122 | FATAL | jsLogger | fatal client log message 26 | 2017-02-28 22:59:25,130 | WARN | jsLogger | {"msg":"warn client log message - logging object","x":5,"y":88} 27 | 2017-02-28 22:59:25,131 | DEBUG | jsLogger | debug client log message 28 | 2017-02-28 22:59:25,298 | FATAL | ClientRoot | {"stack":"ReferenceError: 'xyz' is undefined\n at Global code (http://localhost:54823/scripts/jsnlogdemo.js:14:2)","message":"'xyz' is undefined","name":"ReferenceError","logData":"Something went wrong!"} 29 | 2017-02-28 22:59:25,137 | FATAL | onerrorLogger | {"msg":"Uncaught Exception","errorMsg":"'xyz2' is undefined","url":"http://localhost:54823/scripts/jsnlogdemo.js","line number":21,"column":1} 30 | 2017-02-28 22:59:25,189 | ERROR | jsLogger | error client log message - returned by function 31 | 2017-02-28 22:59:25,834 | INFO | jsLogger | info client log message 32 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationAmqpPackage/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationHttpPackage/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationUdpPackage/SimpleConsoleApplicationUdpPackage.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {13AED8DE-6167-4891-9F33-10FE917A2608} 8 | Exe 9 | Properties 10 | SimpleConsoleApplication 11 | SimpleConsoleApplication 12 | v4.6.2 13 | 512 14 | 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | ..\packages\Gelf4Net.Core.1.0.0.20\lib\net452\Gelf4Net.Core.dll 38 | 39 | 40 | ..\packages\Gelf4Net.UdpAppender.1.0.0.20\lib\net452\Gelf4Net.UdpAppender.dll 41 | 42 | 43 | ..\packages\log4net.2.0.12\lib\net45\log4net.dll 44 | 45 | 46 | ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | Designer 65 | 66 | 67 | 68 | 69 | 76 | -------------------------------------------------------------------------------- /src/Gelf4Net.Core/GelfMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using Newtonsoft.Json; 4 | using System.Collections.Generic; 5 | 6 | namespace Gelf4Net 7 | { 8 | public class GelfMessage : Dictionary 9 | { 10 | 11 | private const string FacilityKey = "facility"; 12 | private const string FileKey = "file"; 13 | private const string FullMessageKey = "full_message"; 14 | private const string HostKey = "host"; 15 | private const string LevelKey = "level"; 16 | private const string LineKey = "line"; 17 | private const string ShortMessageKey = "short_message"; 18 | private const string VersionKey = "version"; 19 | private const string TimeStampKey = "timestamp"; 20 | 21 | 22 | public string Facility 23 | { 24 | get { return PullStringValue(FacilityKey); } 25 | set { StoreValue(FacilityKey, value); } 26 | } 27 | 28 | public string File 29 | { 30 | get { return PullStringValue(FileKey); } 31 | set { StoreValue(FileKey, value); } 32 | } 33 | 34 | public string FullMessage 35 | { 36 | get { return PullStringValue(FullMessageKey); } 37 | set { StoreValue(FullMessageKey, value); } 38 | } 39 | 40 | public string Host 41 | { 42 | get { return PullStringValue(HostKey); } 43 | set { StoreValue(HostKey, value); } 44 | } 45 | 46 | public long Level 47 | { 48 | get 49 | { 50 | if (!this.ContainsKey(LevelKey)) 51 | return int.MinValue; 52 | 53 | return (long)this[LevelKey]; 54 | } 55 | set { StoreValue(LevelKey, value); } 56 | } 57 | 58 | public string Line 59 | { 60 | get { return PullStringValue(LineKey); } 61 | set { StoreValue(LineKey, value); } 62 | } 63 | 64 | public string ShortMessage 65 | { 66 | get { return PullStringValue(ShortMessageKey); } 67 | set { StoreValue(ShortMessageKey, value); } 68 | } 69 | 70 | public DateTime TimeStamp 71 | { 72 | get 73 | { 74 | if (!this.ContainsKey(TimeStampKey)) 75 | return DateTime.MinValue; 76 | 77 | var val = this[TimeStampKey]; 78 | if (_sentTimeStampAsString) 79 | { 80 | double value; 81 | var parsed = double.TryParse(val as string, NumberStyles.Any, CultureInfo.InvariantCulture, out value); 82 | return parsed ? value.FromUnixTimestamp() : DateTime.MinValue; 83 | } 84 | 85 | return Convert.ToDouble(val).FromUnixTimestamp(); 86 | } 87 | set 88 | { 89 | var timestamp = value.ToUnixTimestamp(); 90 | StoreValue(TimeStampKey, timestamp); 91 | if (_sentTimeStampAsString) 92 | { 93 | StoreValue(TimeStampKey, timestamp.ToString(CultureInfo.InvariantCulture)); 94 | } 95 | 96 | } 97 | } 98 | 99 | public string Version 100 | { 101 | get { return PullStringValue(VersionKey); } 102 | set { StoreValue(VersionKey, value); } 103 | } 104 | 105 | private string PullStringValue(String key) 106 | { 107 | return ContainsKey(key) ? this[key].ToString() : string.Empty; 108 | } 109 | 110 | private void StoreValue(string key, object value) 111 | { 112 | if (!ContainsKey(key)) 113 | Add(key, value); 114 | else 115 | this[key] = value; 116 | } 117 | 118 | private bool _sentTimeStampAsString; 119 | 120 | public GelfMessage(bool sendTimeStampAsString = false) 121 | { 122 | _sentTimeStampAsString = sendTimeStampAsString; 123 | } 124 | 125 | public GelfMessage() 126 | { 127 | 128 | } 129 | } 130 | } -------------------------------------------------------------------------------- /examples/SimpleConsoleApplicationAmqpPackage/SimpleConsoleApplicationAmqpPackage.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {2A9C7C2F-4FE8-478F-96FE-71F631008D6D} 8 | Exe 9 | Properties 10 | SimpleConsoleApplication 11 | SimpleConsoleApplication 12 | v4.6.2 13 | 512 14 | 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | SimpleConsoleApplication.Program 37 | 38 | 39 | 40 | ..\packages\Gelf4Net.AmqpAppender.1.0.0.20\lib\net452\Gelf4Net.AmqpAppender.dll 41 | 42 | 43 | ..\packages\Gelf4Net.Core.1.0.0.20\lib\net452\Gelf4Net.Core.dll 44 | 45 | 46 | ..\packages\log4net.2.0.12\lib\net45\log4net.dll 47 | 48 | 49 | ..\packages\Microsoft.Diagnostics.Tracing.EventSource.Redist.1.1.28\lib\net40\Microsoft.Diagnostics.Tracing.EventSource.dll 50 | 51 | 52 | ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll 53 | 54 | 55 | ..\packages\RabbitMQ.Client.5.2.0\lib\net451\RabbitMQ.Client.dll 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | Designer 74 | 75 | 76 | 77 | 78 | 85 | -------------------------------------------------------------------------------- /src/Gelf4Net.Core/Util/BufferedLogSender.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Concurrent; 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | using System.Linq; 6 | using System.Threading; 7 | using System.Threading.Tasks; 8 | using log4net.Core; 9 | 10 | namespace Gelf4Net.Util 11 | { 12 | internal class BufferedLogSender 13 | { 14 | private readonly ConcurrentQueue _pendingTasks; 15 | private readonly CancellationTokenSource _cts; 16 | private readonly Func> _sendFunc; 17 | private readonly Func _funcWaitToRecover; 18 | private readonly Func _funcIsWaiting; 19 | private readonly Task _sender; 20 | private readonly int _bufferSize; 21 | static SemaphoreSlim semaphoreSlim = new SemaphoreSlim(1, 1); 22 | 23 | public BufferedLogSender(BufferedSenderOptions options, Func> sendFunc) : this(options, sendFunc, null, null) 24 | { 25 | } 26 | 27 | public BufferedLogSender(BufferedSenderOptions options, Func> sendFunc, Func funcWaitToRecover, Func funcIsWaiting) 28 | { 29 | _bufferSize = options.BufferSize ?? BufferedSenderOptions.DefaultBufferSize; 30 | if (_bufferSize <= 1) 31 | { 32 | _bufferSize = BufferedSenderOptions.DefaultBufferSize; 33 | } 34 | var numTasks = options.NumTasks ?? Environment.ProcessorCount; 35 | if (numTasks <= 1) 36 | { 37 | numTasks = Environment.ProcessorCount; 38 | } 39 | 40 | _pendingTasks = new ConcurrentQueue(); 41 | _cts = new CancellationTokenSource(); 42 | _sendFunc = sendFunc; 43 | _funcWaitToRecover = funcWaitToRecover; 44 | _funcIsWaiting = funcIsWaiting; 45 | _sender = Task.WhenAll(Enumerable.Range(1, numTasks).Select(_ => Task.Run(SendMessagesAsync))); 46 | } 47 | 48 | private async Task SendMessagesAsync() 49 | { 50 | Debug.WriteLine("[Gelf4Net] Start Buffered Log Sender"); 51 | var token = _cts.Token; 52 | while (!_cts.IsCancellationRequested) 53 | { 54 | if (_pendingTasks.Count > 0) 55 | { 56 | if (_funcIsWaiting != null && _funcIsWaiting()) 57 | { 58 | await Task.Delay(TimeSpan.FromSeconds(1)).ConfigureAwait(false); 59 | continue; 60 | } 61 | 62 | if (_funcWaitToRecover != null) 63 | { 64 | await _funcWaitToRecover().ConfigureAwait(false); 65 | } 66 | 67 | await semaphoreSlim.WaitAsync(); 68 | try 69 | { 70 | if (_pendingTasks.TryPeek(out string payload)) 71 | { 72 | Debug.WriteLine("[Gelf4Net] send" + payload); 73 | var shouldDequeue = await _sendFunc(payload).ConfigureAwait(false); 74 | if (shouldDequeue) 75 | { 76 | _pendingTasks.TryDequeue(out _); 77 | } 78 | else 79 | { 80 | if (_pendingTasks.Count > _bufferSize) 81 | { 82 | _pendingTasks.TryDequeue(out _); 83 | } 84 | } 85 | } 86 | } 87 | finally 88 | { 89 | semaphoreSlim.Release(); 90 | } 91 | } 92 | else 93 | { 94 | await Task.Delay(TimeSpan.FromSeconds(1)).ConfigureAwait(false); 95 | } 96 | } 97 | Debug.WriteLine("[Gelf4Net] Stop Buffered Log Sender"); 98 | } 99 | 100 | public void QueueSend(string renderedLogLine) 101 | { 102 | _pendingTasks.Enqueue(renderedLogLine); 103 | if (_pendingTasks.Count > _bufferSize) 104 | { 105 | _pendingTasks.TryDequeue(out _); 106 | } 107 | } 108 | 109 | public void Stop() 110 | { 111 | _cts.Cancel(); 112 | Task.WaitAny(new[] { _sender }, TimeSpan.FromSeconds(10)); 113 | Debug.WriteLine("[Gelf4Net] Logging thread has stopped"); 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /examples/RandomSentence/RandomSentenceForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace SandboxWindow 2 | { 3 | partial class RadomSentenceForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.label1 = new System.Windows.Forms.Label(); 32 | this.button1 = new System.Windows.Forms.Button(); 33 | this.button2 = new System.Windows.Forms.Button(); 34 | this.button3 = new System.Windows.Forms.Button(); 35 | this.SuspendLayout(); 36 | // 37 | // label1 38 | // 39 | this.label1.AutoSize = true; 40 | this.label1.BackColor = System.Drawing.Color.Transparent; 41 | this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 42 | this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); 43 | this.label1.Location = new System.Drawing.Point(12, 76); 44 | this.label1.Name = "label1"; 45 | this.label1.Size = new System.Drawing.Size(88, 31); 46 | this.label1.TabIndex = 0; 47 | this.label1.Text = "TEST"; 48 | // 49 | // button1 50 | // 51 | this.button1.Location = new System.Drawing.Point(18, 23); 52 | this.button1.Name = "button1"; 53 | this.button1.Size = new System.Drawing.Size(186, 36); 54 | this.button1.TabIndex = 1; 55 | this.button1.Text = "Log Random Sentence"; 56 | this.button1.UseVisualStyleBackColor = true; 57 | this.button1.Click += new System.EventHandler(this.button1_Click); 58 | // 59 | // button2 60 | // 61 | this.button2.Location = new System.Drawing.Point(402, 23); 62 | this.button2.Name = "button2"; 63 | this.button2.Size = new System.Drawing.Size(101, 36); 64 | this.button2.TabIndex = 2; 65 | this.button2.Text = "Throw Exception"; 66 | this.button2.UseVisualStyleBackColor = true; 67 | this.button2.Click += new System.EventHandler(this.button2_Click); 68 | // 69 | // button3 70 | // 71 | this.button3.Location = new System.Drawing.Point(210, 23); 72 | this.button3.Name = "button3"; 73 | this.button3.Size = new System.Drawing.Size(186, 36); 74 | this.button3.TabIndex = 3; 75 | this.button3.Text = "Log Custom Object"; 76 | this.button3.UseVisualStyleBackColor = true; 77 | this.button3.Click += new System.EventHandler(this.button3_Click); 78 | // 79 | // RadomSentenceForm 80 | // 81 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 82 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 83 | this.BackgroundImage = global::SandboxWindow.Resources.SeamlessMetal; 84 | this.ClientSize = new System.Drawing.Size(564, 354); 85 | this.Controls.Add(this.button3); 86 | this.Controls.Add(this.button2); 87 | this.Controls.Add(this.button1); 88 | this.Controls.Add(this.label1); 89 | this.Name = "RadomSentenceForm"; 90 | this.Text = "Random Sentence"; 91 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); 92 | this.ResumeLayout(false); 93 | this.PerformLayout(); 94 | 95 | } 96 | 97 | #endregion 98 | 99 | private System.Windows.Forms.Label label1; 100 | private System.Windows.Forms.Button button1; 101 | private System.Windows.Forms.Button button2; 102 | private System.Windows.Forms.Button button3; 103 | } 104 | } 105 | 106 | -------------------------------------------------------------------------------- /examples/RandomSentence/Resources/adverbs.txt: -------------------------------------------------------------------------------- 1 | abnormally 2 | absentmindedly 3 | accidentally 4 | acidly 5 | actually 6 | adventurously 7 | afterwards 8 | almost 9 | always 10 | angrily 11 | annually 12 | anxiously 13 | arrogantly 14 | awkwardly 15 | badly 16 | bashfully 17 | beautifully 18 | bitterly 19 | bleakly 20 | blindly 21 | blissfully 22 | boastfully 23 | boldly 24 | bravely 25 | briefly 26 | brightly 27 | briskly 28 | broadly 29 | busily 30 | calmly 31 | carefully 32 | carelessly 33 | cautiously 34 | certainly 35 | cheerfully 36 | clearly 37 | cleverly 38 | closely 39 | coaxingly 40 | colorfully 41 | commonly 42 | continually 43 | coolly 44 | correctly 45 | courageously 46 | crossly 47 | cruelly 48 | curiously 49 | daily 50 | daintily 51 | dearly 52 | deceivingly 53 | delightfully 54 | deeply 55 | defiantly 56 | deliberately 57 | delightfully 58 | diligently 59 | dimly 60 | doubtfully 61 | dreamily 62 | easily 63 | elegantly 64 | energetically 65 | enormously 66 | enthusiastically 67 | equally 68 | especially 69 | even 70 | evenly 71 | eventually 72 | exactly 73 | excitedly 74 | extremely 75 | fairly 76 | faithfully 77 | famously 78 | far 79 | fast 80 | fatally 81 | ferociously 82 | fervently 83 | fiercely 84 | fondly 85 | foolishly 86 | fortunately 87 | frankly 88 | frantically 89 | freely 90 | frenetically 91 | frightfully 92 | fully 93 | furiously 94 | generally 95 | generously 96 | gently 97 | gladly 98 | gleefully 99 | gracefully 100 | gratefully 101 | greatly 102 | greedily 103 | happily 104 | hastily 105 | healthily 106 | heavily 107 | helpfully 108 | helplessly 109 | highly 110 | honestly 111 | hopelessly 112 | hourly 113 | hungrily 114 | immediately 115 | innocently 116 | inquisitively 117 | instantly 118 | intensely 119 | intently 120 | interestingly 121 | inwardly 122 | irritably 123 | jaggedly 124 | jealously 125 | joshingly 126 | joyfully 127 | joyously 128 | jovially 129 | jubilantly 130 | judgementally 131 | justly 132 | keenly 133 | kiddingly 134 | kindheartedly 135 | kindly 136 | kissingly 137 | knavishly 138 | knottily 139 | knowingly 140 | knowledgeably 141 | kookily 142 | lazily 143 | less 144 | lightly 145 | likely 146 | limply 147 | lively 148 | loftily 149 | longingly 150 | loosely 151 | lovingly 152 | loudly 153 | loyally 154 | madly 155 | majestically 156 | meaningfully 157 | mechanically 158 | merrily 159 | miserably 160 | mockingly 161 | monthly 162 | more 163 | mortally 164 | mostly 165 | mysteriously 166 | naturally 167 | nearly 168 | neatly 169 | needily 170 | nervously 171 | never 172 | nicely 173 | noisily 174 | not 175 | obediently 176 | obnoxiously 177 | oddly 178 | offensively 179 | officially 180 | often 181 | only 182 | openly 183 | optimistically 184 | overconfidently 185 | owlishly 186 | painfully 187 | partially 188 | patiently 189 | perfectly 190 | physically 191 | playfully 192 | politely 193 | poorly 194 | positively 195 | potentially 196 | powerfully 197 | promptly 198 | properly 199 | punctually 200 | quaintly 201 | quarrelsomely 202 | queasily 203 | queerly 204 | questionably 205 | questioningly 206 | quicker 207 | quickly 208 | quietly 209 | quirkily 210 | quizzically 211 | rapidly 212 | rarely 213 | readily 214 | really 215 | reassuringly 216 | recklessly 217 | regularly 218 | reluctantly 219 | repeatedly 220 | reproachfully 221 | restfully 222 | righteously 223 | rightfully 224 | rigidly 225 | roughly 226 | rudely 227 | sadly 228 | safely 229 | scarcely 230 | scarily 231 | searchingly 232 | sedately 233 | seemingly 234 | seldom 235 | selfishly 236 | separately 237 | seriously 238 | shakily 239 | sharply 240 | sheepishly 241 | shrilly 242 | shyly 243 | silently 244 | sleepily 245 | slowly 246 | smoothly 247 | softly 248 | solemnly 249 | solidly 250 | sometimes 251 | soon 252 | speedily 253 | stealthily 254 | sternly 255 | strictly 256 | successfully 257 | suddenly 258 | surprisingly 259 | suspiciously 260 | sweetly 261 | swiftly 262 | sympathetically 263 | tenderly 264 | tensely 265 | terribly 266 | thankfully 267 | thoroughly 268 | thoughtfully 269 | tightly 270 | tomorrow 271 | too 272 | tremendously 273 | triumphantly 274 | truly 275 | truthfully 276 | ultimately 277 | unabashedly 278 | unaccountably 279 | unbearably 280 | unethically 281 | unexpectedly 282 | unfortunately 283 | unimpressively 284 | unnaturally 285 | unnecessarily 286 | utterly 287 | upbeat 288 | upliftingly 289 | upright 290 | upside-down 291 | upward 292 | upwardly 293 | urgently 294 | usefully 295 | uselessly 296 | usually 297 | utterly 298 | vacantly 299 | vaguely 300 | vainly 301 | valiantly 302 | vastly 303 | verbally 304 | very 305 | viciously 306 | victoriously 307 | violently 308 | vivaciously 309 | voluntarily 310 | warmly 311 | weakly 312 | wearily 313 | well 314 | wetly 315 | wholly 316 | wildly 317 | willfully 318 | wisely 319 | woefully 320 | wonderfully 321 | worriedly 322 | wrongly 323 | yawningly 324 | yearly 325 | yearningly 326 | yesterday 327 | yieldingly 328 | youthfully 329 | zealously 330 | zestfully 331 | zestily -------------------------------------------------------------------------------- /examples/RandomSentence/RandomSentenceForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Windows.Forms; 10 | using log4net; 11 | using System.Net; 12 | 13 | namespace SandboxWindow 14 | { 15 | public partial class RadomSentenceForm : Form 16 | { 17 | protected static readonly ILog log = LogManager.GetLogger(typeof(RadomSentenceForm)); 18 | 19 | public RadomSentenceForm() 20 | { 21 | log4net.Config.XmlConfigurator.Configure(); 22 | InitializeComponent(); 23 | this.FormBorderStyle = FormBorderStyle.Fixed3D; 24 | } 25 | 26 | private void Form1_Load(object sender, EventArgs e) 27 | { 28 | log.Debug("Starting the randomizer sentence"); 29 | Size = new Size(800, 600); 30 | LogRandomSentence(); 31 | } 32 | 33 | private string GetPath(string path, string file) 34 | { 35 | return String.Concat(path, Path.DirectorySeparatorChar, file); 36 | } 37 | 38 | private void LogRandomSentence() 39 | { 40 | var sentence = GetRandomSentence(); 41 | 42 | log.Debug(String.Format("Randomizer Sentence: {0}", sentence)); 43 | } 44 | 45 | private string GetRandomSentence() 46 | { 47 | var syntaxes = File.ReadAllLines(GetPath("Resources", "syntax.txt")); 48 | var nouns = File.ReadAllLines(GetPath("Resources", "nouns.txt")); 49 | var verbs = File.ReadAllLines(GetPath("Resources", "verbs.txt")); 50 | var adjectives = File.ReadAllLines(GetPath("Resources", "adjectives.txt")); 51 | var adverbs = File.ReadAllLines(GetPath("Resources", "adverbs.txt")); 52 | var rand = new Random(); 53 | 54 | var sentence = syntaxes[rand.Next(syntaxes.Length)]; 55 | var complete = false; 56 | while (!complete) 57 | { 58 | var index = sentence.IndexOf("[Noun]"); 59 | if (index > 0) 60 | { 61 | sentence = sentence.Remove(index, "[Noun]".Length); 62 | sentence = sentence.Insert(index, nouns[rand.Next(nouns.Length)].Trim()); 63 | continue; 64 | } 65 | index = sentence.IndexOf("[Verb]"); 66 | if (index > 0) 67 | { 68 | sentence = sentence.Remove(index, "[Verb]".Length); 69 | sentence = sentence.Insert(index, verbs[rand.Next(verbs.Length)].Trim()); 70 | continue; 71 | } 72 | index = sentence.IndexOf("[Adverb]"); 73 | if (index > 0) 74 | { 75 | sentence = sentence.Remove(index, "[Adverb]".Length); 76 | sentence = sentence.Insert(index, adverbs[rand.Next(adverbs.Length)].Trim()); 77 | continue; 78 | } 79 | index = sentence.IndexOf("[Adjective]"); 80 | if (index > 0) 81 | { 82 | sentence = sentence.Remove(index, "[Adjective]".Length); 83 | sentence = sentence.Insert(index, adjectives[rand.Next(adjectives.Length)].Trim()); 84 | continue; 85 | } 86 | complete = true; 87 | } 88 | var cutIndex = 0; 89 | var readChars = 0; 90 | const int maxWidth = 32; 91 | while (sentence.Length > readChars + maxWidth) 92 | { 93 | cutIndex = sentence.Substring(cutIndex, maxWidth).LastIndexOf(" "); 94 | sentence = sentence.Remove(readChars + cutIndex, 1); 95 | sentence = sentence.Insert(readChars + cutIndex, "\n"); 96 | readChars += cutIndex; 97 | } 98 | 99 | label1.Text = sentence.ToUpper(); 100 | return label1.Text; 101 | } 102 | 103 | private void Form1_FormClosing(object sender, FormClosingEventArgs e) 104 | { 105 | log.Debug("Closing the app"); 106 | } 107 | 108 | private void button1_Click(object sender, EventArgs e) 109 | { 110 | LogRandomSentence(); 111 | } 112 | 113 | private void button2_Click(object sender, EventArgs e) 114 | { 115 | try 116 | { 117 | throw new ApplicationException("An exception just got thrown!!!!"); 118 | } 119 | catch (Exception ex) 120 | { 121 | log.Error("An error was thrown", ex); 122 | } 123 | } 124 | 125 | private void button3_Click(object sender, EventArgs e) 126 | { 127 | log.Debug(new 128 | { 129 | Message = GetRandomSentence(), 130 | CustomProp = "Another Prop" 131 | }); 132 | } 133 | } 134 | } -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | ** Unobtrusive validation support library for jQuery and jQuery Validate 3 | ** Copyright (C) Microsoft Corporation. All rights reserved. 4 | */ 5 | !function(a){function e(a,e,n){a.rules[e]=n,a.message&&(a.messages[e]=a.message)}function n(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function t(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function r(a){return a.substr(0,a.lastIndexOf(".")+1)}function i(a,e){return 0===a.indexOf("*.")&&(a=a.replace("*.",e)),a}function o(e,n){var r=a(this).find("[data-valmsg-for='"+t(n[0].name)+"']"),i=r.attr("data-valmsg-replace"),o=i?a.parseJSON(i)!==!1:null;r.removeClass("field-validation-valid").addClass("field-validation-error"),e.data("unobtrusiveContainer",r),o?(r.empty(),e.removeClass("input-validation-error").appendTo(r)):e.hide()}function d(e,n){var t=a(this).find("[data-valmsg-summary=true]"),r=t.find("ul");r&&r.length&&n.errorList.length&&(r.empty(),t.addClass("validation-summary-errors").removeClass("validation-summary-valid"),a.each(n.errorList,function(){a("
  • ").html(this.message).appendTo(r)}))}function s(e){var n=e.data("unobtrusiveContainer");if(n){var t=n.attr("data-valmsg-replace"),r=t?a.parseJSON(t):null;n.addClass("field-validation-valid").removeClass("field-validation-error"),e.removeData("unobtrusiveContainer"),r&&n.empty()}}function l(e){var n=a(this),t="__jquery_unobtrusive_validation_form_reset";if(!n.data(t)){n.data(t,!0);try{n.data("validator").resetForm()}finally{n.removeData(t)}n.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors"),n.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}}function m(e){var n=a(e),t=n.data(v),r=a.proxy(l,e),i=p.unobtrusive.options||{},m=function(n,t){var r=i[n];r&&a.isFunction(r)&&r.apply(e,t)};return t||(t={options:{errorClass:i.errorClass||"input-validation-error",errorElement:i.errorElement||"span",errorPlacement:function(){o.apply(e,arguments),m("errorPlacement",arguments)},invalidHandler:function(){d.apply(e,arguments),m("invalidHandler",arguments)},messages:{},rules:{},success:function(){s.apply(e,arguments),m("success",arguments)}},attachValidation:function(){n.off("reset."+v,r).on("reset."+v,r).validate(this.options)},validate:function(){return n.validate(),n.valid()}},n.data(v,t)),t}var u,p=a.validator,v="unobtrusiveValidation";p.unobtrusive={adapters:[],parseElement:function(e,n){var t,r,i,o=a(e),d=o.parents("form")[0];d&&(t=m(d),t.options.rules[e.name]=r={},t.options.messages[e.name]=i={},a.each(this.adapters,function(){var n="data-val-"+this.name,t=o.attr(n),s={};void 0!==t&&(n+="-",a.each(this.params,function(){s[this]=o.attr(n+this)}),this.adapt({element:e,form:d,message:t,params:s,rules:r,messages:i}))}),a.extend(r,{__dummy__:!0}),n||t.attachValidation())},parse:function(e){var n=a(e),t=n.parents().addBack().filter("form").add(n.find("form")).has("[data-val=true]");n.find("[data-val=true]").each(function(){p.unobtrusive.parseElement(this,!0)}),t.each(function(){var a=m(this);a&&a.attachValidation()})}},u=p.unobtrusive.adapters,u.add=function(a,e,n){return n||(n=e,e=[]),this.push({name:a,params:e,adapt:n}),this},u.addBool=function(a,n){return this.add(a,function(t){e(t,n||a,!0)})},u.addMinMax=function(a,n,t,r,i,o){return this.add(a,[i||"min",o||"max"],function(a){var i=a.params.min,o=a.params.max;i&&o?e(a,r,[i,o]):i?e(a,n,i):o&&e(a,t,o)})},u.addSingleVal=function(a,n,t){return this.add(a,[n||"val"],function(r){e(r,t||a,r.params[n])})},p.addMethod("__dummy__",function(a,e,n){return!0}),p.addMethod("regex",function(a,e,n){var t;return this.optional(e)?!0:(t=new RegExp(n).exec(a),t&&0===t.index&&t[0].length===a.length)}),p.addMethod("nonalphamin",function(a,e,n){var t;return n&&(t=a.match(/\W/g),t=t&&t.length>=n),t}),p.methods.extension?(u.addSingleVal("accept","mimtype"),u.addSingleVal("extension","extension")):u.addSingleVal("extension","extension","accept"),u.addSingleVal("regex","pattern"),u.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),u.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),u.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength"),u.add("equalto",["other"],function(n){var o=r(n.element.name),d=n.params.other,s=i(d,o),l=a(n.form).find(":input").filter("[name='"+t(s)+"']")[0];e(n,"equalTo",l)}),u.add("required",function(a){("INPUT"!==a.element.tagName.toUpperCase()||"CHECKBOX"!==a.element.type.toUpperCase())&&e(a,"required",!0)}),u.add("remote",["url","type","additionalfields"],function(o){var d={url:o.params.url,type:o.params.type||"GET",data:{}},s=r(o.element.name);a.each(n(o.params.additionalfields||o.element.name),function(e,n){var r=i(n,s);d.data[r]=function(){var e=a(o.form).find(":input").filter("[name='"+t(r)+"']");return e.is(":checkbox")?e.filter(":checked").val()||e.filter(":hidden").val()||"":e.is(":radio")?e.filter(":checked").val()||"":e.val()}}),e(o,"remote",d)}),u.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&e(a,"minlength",a.params.min),a.params.nonalphamin&&e(a,"nonalphamin",a.params.nonalphamin),a.params.regex&&e(a,"regex",a.params.regex)}),a(function(){p.unobtrusive.parse(document)})}(jQuery); -------------------------------------------------------------------------------- /examples/SimpleDotnetcoreWebApplication/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBDvCR,mBAAA,mBAAA,oBAAA,oBAAA,iBAAA,iBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBCsCA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBDlCR,qBAAA,sBAAA,sBAAA,uBAAA,mBAAA,oBAAA,sBAAA,uBAAA,sBAAA,uBAAA,sBAAA,uBAAA,+BAAA,gCAAA,6BAAA,gCAAA,gCAAA,gCCiCA,mBAAA,KACQ,WAAA,KDlDV,mBAAA,oBAAA,iBAAA,oBAAA,oBAAA,oBAuBI,YAAA,KAyCF,YAAA,YAEE,iBAAA,KAKJ,aErEI,YAAA,EAAA,IAAA,EAAA,KACA,iBAAA,iDACA,iBAAA,4CAAA,iBAAA,qEAEA,iBAAA,+CCnBF,OAAA,+GH4CA,OAAA,0DACA,kBAAA,SAuC2C,aAAA,QAA2B,aAAA,KArCtE,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAgBN,aEtEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAiBN,aEvEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAkBN,UExEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,gBAAA,gBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,iBAAA,iBAEE,iBAAA,QACA,aAAA,QAMA,mBAAA,0BAAA,yBAAA,0BAAA,yBAAA,yBAAA,oBAAA,2BAAA,0BAAA,2BAAA,0BAAA,0BAAA,6BAAA,oCAAA,mCAAA,oCAAA,mCAAA,mCAME,iBAAA,QACA,iBAAA,KAmBN,aEzEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAoBN,YE1EI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,kBAAA,kBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,mBAAA,mBAEE,iBAAA,QACA,aAAA,QAMA,qBAAA,4BAAA,2BAAA,4BAAA,2BAAA,2BAAA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,+BAAA,sCAAA,qCAAA,sCAAA,qCAAA,qCAME,iBAAA,QACA,iBAAA,KA2BN,eAAA,WClCE,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBD2CV,0BAAA,0BE3FI,iBAAA,QACA,iBAAA,oDACA,iBAAA,+CAAA,iBAAA,wEACA,iBAAA,kDACA,OAAA,+GF0FF,kBAAA,SAEF,yBAAA,+BAAA,+BEhGI,iBAAA,QACA,iBAAA,oDACA,iBAAA,+CAAA,iBAAA,wEACA,iBAAA,kDACA,OAAA,+GFgGF,kBAAA,SASF,gBE7GI,iBAAA,iDACA,iBAAA,4CACA,iBAAA,qEAAA,iBAAA,+CACA,OAAA,+GACA,OAAA,0DCnBF,kBAAA,SH+HA,cAAA,ICjEA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBD6DV,sCAAA,oCE7GI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SD2CF,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBD0EV,cAAA,iBAEE,YAAA,EAAA,IAAA,EAAA,sBAIF,gBEhII,iBAAA,iDACA,iBAAA,4CACA,iBAAA,qEAAA,iBAAA,+CACA,OAAA,+GACA,OAAA,0DCnBF,kBAAA,SHkJA,cAAA,IAHF,sCAAA,oCEhII,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SD2CF,mBAAA,MAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBDgFV,8BAAA,iCAYI,YAAA,EAAA,KAAA,EAAA,gBAKJ,qBAAA,kBAAA,mBAGE,cAAA,EAqBF,yBAfI,mDAAA,yDAAA,yDAGE,MAAA,KE7JF,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,UFqKJ,OACE,YAAA,EAAA,IAAA,EAAA,qBC3HA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,gBDsIV,eEtLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAKF,YEvLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAMF,eExLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAOF,cEzLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAeF,UEjMI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFuMJ,cE3MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFwMJ,sBE5MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyMJ,mBE7MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0MJ,sBE9MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2MJ,qBE/MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF+MJ,sBElLI,iBAAA,yKACA,iBAAA,oKACA,iBAAA,iKFyLJ,YACE,cAAA,IC9KA,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBDgLV,wBAAA,8BAAA,8BAGE,YAAA,EAAA,KAAA,EAAA,QEnOE,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFiOF,aAAA,QALF,+BAAA,qCAAA,qCAQI,YAAA,KAUJ,OCnME,mBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,EAAA,IAAA,IAAA,gBD4MV,8BE5PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyPJ,8BE7PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0PJ,8BE9PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2PJ,2BE/PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA"} --------------------------------------------------------------------------------