LogDX 1.1.4

dotnet add package LogDX --version 1.1.4                
NuGet\Install-Package LogDX -Version 1.1.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LogDX" Version="1.1.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LogDX --version 1.1.4                
#r "nuget: LogDX, 1.1.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LogDX as a Cake Addin
#addin nuget:?package=LogDX&version=1.1.4

// Install LogDX as a Cake Tool
#tool nuget:?package=LogDX&version=1.1.4                

Log Yazma Örneği:

        LogDX.Helpers.LogApiHelper _logApiHelper = new LogDX.Helpers.LogApiHelper(
                application: ConfigurationManager.AppSettings["ApplicationName"],
                logApiAddress: ConfigurationManager.AppSettings["LogApiAddress"].ToString(),                           
                indexFormat: ConfigurationManager.AppSettings["ElasticIndexFormat"].ToString()
                      

//API Adresi Yazılmalı. Önemli! Örnek: http://localhost:8083/api/log //ozer-ws-{0:yyyy.MM.dd});

        _logApiHelper.WriteLogElasticSearch(new LogDX.Models.LogModel
        {
            LogCategory = LogDX.Enums.LogDetail.APP_START,
            LogLevel = LogDX.Enums.LogLevel.Information,
            Type = LogDX.Enums.LogType.ELASTICSEARCH,
            FormData = _logApiHelper.CreateFormDataJObject("Item1=itm1&Item2=itm2"),
            User = _logApiHelper.GetUserName(),
            Ip = "",
            Exception = "",
            FileOverride = false,                               
            URL = "",
            WSInput = "",
            WSOutput = "",                
        });

Api Check Örneği:

        LogDX.Helpers.LogApiHelper _logApiHelper = new LogDX.Helpers.LogApiHelper();
        var result = _logApiHelper.ApiCheck("http://localhost:8083").Result;
        
        if(result)
        {
            MessageBox.Show("Api çalışıyor.");
        }
        else
        {
            MessageBox.Show("Api çalışmıyor.");
        }

IgnoredFileType Ekleme Örneği:

        LogDX.Helpers.LogApiHelper _logApiHelper = new LogDX.Helpers.LogApiHelper();
        _logApiHelper.AddIgnoredFileType("asmx");

IgnoredPath Ekleme Örneği:

        LogDX.Helpers.LogApiHelper _logApiHelper = new LogDX.Helpers.LogApiHelper();
        _logApiHelper.AddIgnoredPath("/Tester/Tester/");

IgnoredSubPath Ekleme Örneği:

        LogDX.Helpers.LogApiHelper _logApiHelper = new LogDX.Helpers.LogApiHelper();
        _logApiHelper.AddIgnoredSubPath("/Image/");

IgnoredFileType Listeleme Örneği:

        LogDX.Helpers.LogApiHelper _logApiHelper = new LogDX.Helpers.LogApiHelper();
        List<string> list = _logApiHelper.ListIgnoredFileType();

IgnoredPath Listeleme Örneği:

        LogDX.Helpers.LogApiHelper _logApiHelper = new LogDX.Helpers.LogApiHelper();
        List<string> list = _logApiHelper.ListIgnoredPath();

IgnoredSubPath Listeleme Örneği:

        LogDX.Helpers.LogApiHelper _logApiHelper = new LogDX.Helpers.LogApiHelper();
        List<string> list = _logApiHelper.ListIgnoredSubPath();

Config Örneği:

<?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="LogApiAddress" value="http://localhost:8083/api/Log" /> <add key="ElasticIndexFormat" value="tester-{0:yyyy.MM.dd}" /> <add key="ApplicationName" value="Log Tester" /> </appSettings> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> </startup> </configuration>

Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.4 27,688 5/22/2020

SabanciDX ELK Entegrasyonu