Inhouse.Sdk.Logger 1.0.1.5

dotnet add package Inhouse.Sdk.Logger --version 1.0.1.5
                    
NuGet\Install-Package Inhouse.Sdk.Logger -Version 1.0.1.5
                    
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="Inhouse.Sdk.Logger" Version="1.0.1.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Inhouse.Sdk.Logger" Version="1.0.1.5" />
                    
Directory.Packages.props
<PackageReference Include="Inhouse.Sdk.Logger" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Inhouse.Sdk.Logger --version 1.0.1.5
                    
#r "nuget: Inhouse.Sdk.Logger, 1.0.1.5"
                    
#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.
#:package Inhouse.Sdk.Logger@1.0.1.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Inhouse.Sdk.Logger&version=1.0.1.5
                    
Install as a Cake Addin
#tool nuget:?package=Inhouse.Sdk.Logger&version=1.0.1.5
                    
Install as a Cake Tool

Logger SDK

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1.5 104 3/4/2015
1.0.1.4 87 11/28/2014
1.0.1.3 51 11/27/2014
1.0.1.2 72 10/17/2014
1.0.1 68 10/2/2014
1.0.0.2 52 10/17/2014
1.0.0 62 10/2/2014

Inhouse.Sdk.Logger

Logger to .Net Apps

This logger can log on Console, TextFiles, Documents(csv,tsv), Splunk via TCP
logger is singelton, you dont need create a instance only need wrtie

<code> LogProviderManager.Logger.Log(LogType.info, "Log FA!") </code>

Parameters:
 name = <string> name for reference the log.

 type = Type Provider for the log
   * Inhouse.Sdk.Logger.Providers.ConsoleLogProvider, Inhouse.Sdk.Logger <- Console
   * Inhouse.Sdk.Logger.Providers.TextLogProvider, Inhouse.Sdk.Logger  <- Text
   * Inhouse.Sdk.Logger.Providers.DocumentLogProvider, Inhouse.Sdk.Logger <- Document like csv,tsv
   * Inhouse.Sdk.Logger.Providers.SplunkLogProvider, Inhouse.Sdk.Logger <- Splunk via TCP
 active = enable or disable
   * true
   * false
 levelLog = filter for the log.
   * debug
   * info
   * warning
   * error
   * fatal
   * userdata
   * appdata
   * systemdata
   * none
 Tip: 1.- When you select the level the logger write the including level and the next forwards
   2.- if you put "*" before the level the logger only write log for this level with out forwards
   3.- You can arrange the level that you can write if only want debug to error you can put debug|error and the logger only write the
    log event debug,info,warning and error.
 
 pattern = the pattern to write the event the keys are
   * %TimeStamp
   * %UtcTimeStamp
   * %Application
   * %HostName
   * %Ip
   * %ThreadId
   * %ThreadName
   * %ClassName
   * %FunctionName
   * %Level
   * %Item
   * %Message
 
 documentType = type to document
   * csv
   * tsv

 fileRolling = file=<nameFile.ext>;maxsize=<size with unit kb,mb,gb>;directory=<path of directory>
      file rolling rename the log automatic.

 host = ip for the host to connect
 
 port = port for the host to connect

Parameter used for providers:

 Console
  * type
  * active
  * levelLog
  * pattern
 Text
  * type
  * active
  * levelLog
  * pattern
  * fileRolling
 Document
  * type
  * active
  * levelLog
  * documentType
  * fileRolling
 Splunk
  * type
  * active
  * levelLog
  * pattern
  * host
  * port
Use:
0) Add Librery by NuGet
1) Create App.config
2) Configure Logs on app.config:
 
 <configSections>
   <section name="LogProviders" type="Inhouse.Sdk.Logger.LogProviderConfiguration, Inhouse.Sdk.Logger" />
 </configSections>

 <LogProviders>
   <providers>
     <add name="Console"
          type="Inhouse.Sdk.Logger.Providers.ConsoleLogProvider, Inhouse.Sdk.Logger"
          active="true"
          levelLog="debug"
          pattern="%HostName %Ip %ClassName %FunctionName %Message" />
     <add name="text"
    type="Inhouse.Sdk.Logger.Providers.TextLogProvider, Inhouse.Sdk.Logger"
          active="false"
          levelLog="debug"
          pattern="%TimeStamp %UtcTimeStamp %Application %HostName %Ip [%ThreadId] %ThreadName %ClassName %FunctionName %Level %Item %Message"
          fileRolling="file=test.log;maxsize=0;directory=C:\temp" />
     <add name="document"
          type="Inhouse.Sdk.Logger.Providers.DocumentLogProvider, Inhouse.Sdk.Logger"
          active="false"
          levelLog="debug"
          documentType="cvs"
          fileRolling="file=test;maxsize=10kb;directory=C:\temp" />
     <add name="splunk"
          type="Inhouse.Sdk.Logger.Providers.SplunkLogProvider, Inhouse.Sdk.Logger"
          active="true"
          levelLog="debug"
          host="127.0.0.1" port="18000"
          pattern="%TimeStamp %UtcTimeStamp %Application %HostName %Ip [%ThreadId] %ThreadName %ClassName %FunctionName %Level %Item %Message" />
   </providers>
 </LogProviders>

 Write Log in functions sample c#:
  
  static void FA()
  {
 LogProviderManager.Logger.Log(LogType.info, "Log FA!");
  }


  Change Log
  *****************************
  V 1.0.1.5
  - Delete the event log write for security errors.

  *****************************
  V 1.0.1.4


  *****************************
  V 1.0.1.3


  *****************************
  V 1.0.1.2


  *****************************
  V 1.0.1.1

  *****************************
  V 1.0.1.0
  - Initial Release!