SabanciDX.Log.Entegrasyonu 1.1.3

SabanciDX ELK Entegrasyonu

Install-Package SabanciDX.Log.Entegrasyonu -Version 1.1.3
dotnet add package SabanciDX.Log.Entegrasyonu --version 1.1.3
<PackageReference Include="SabanciDX.Log.Entegrasyonu" Version="1.1.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SabanciDX.Log.Entegrasyonu --version 1.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Log Yazma Örneği:

        LogDX.Helpers.LogApiHelper _logApiHelper = new LogDX.Helpers.LogApiHelper();
        _logApiHelper.WriteLogElasticSearch(new LogDX.Models.LogModel
        {
            LogCategory = LogDX.Enums.LogDetail.APP_START,
            LogLevel = LogDX.Enums.LogLevel.Information,
            Type = LogDX.Enums.LogType.ELASTICSEARCH,
            Application = "",
            IndexFormat = "ozer-ws-{0:yyyy.MM.dd}",
            FormData = _logApiHelper.CreateFormDataJObject("Item1=itm1&Item2=itm2"),
            User = _logApiHelper.GetUserName(),
            Ip = "",
            Exception = "",
            FileOverride = false,                               
            URL = "",
            WSInput = "",
            WSOutput = "",
            //API Adresi Yazılmalı. Önemli! Örnek: http://localhost:8083/api/log
            LogApiAddress = ""
        });

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();

Log Yazma Örneği:

        LogDX.Helpers.LogApiHelper _logApiHelper = new LogDX.Helpers.LogApiHelper();
        _logApiHelper.WriteLogElasticSearch(new LogDX.Models.LogModel
        {
            LogCategory = LogDX.Enums.LogDetail.APP_START,
            LogLevel = LogDX.Enums.LogLevel.Information,
            Type = LogDX.Enums.LogType.ELASTICSEARCH,
            Application = "",
            IndexFormat = "ozer-ws-{0:yyyy.MM.dd}",
            FormData = _logApiHelper.CreateFormDataJObject("Item1=itm1&Item2=itm2"),
            User = _logApiHelper.GetUserName(),
            Ip = "",
            Exception = "",
            FileOverride = false,                               
            URL = "",
            WSInput = "",
            WSOutput = "",
            //API Adresi Yazılmalı. Önemli! Örnek: http://localhost:8083/api/log
            LogApiAddress = ""
        });

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();

Release Notes

SabanciDX ELK Entegrasyonu

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.3 99 12/23/2019