C# Class GuaranteedRate.Sextant.Loggers.Loggly

This is a minimal class to aysnchronously push data to loggly. It has a basic set of log4net style methods. We can expand if find them to be useful NOTE: Because of how Loggly does tagging, you must set the url and tags BEFORE you start logging events
Inheritance: GuaranteedRate.Sextant.WebClients.AsyncEventReporter
显示文件 Open project: Guaranteed-Rate/GuaranteedRate.Sextant

Public Properties

Property Type Description
LOGGLY_ALL string
LOGGLY_DEBUG string
LOGGLY_ERROR string
LOGGLY_FATAL string
LOGGLY_INFO string
LOGGLY_TAGS string
LOGGLY_URL string
LOGGLY_WARN string

Public Methods

Method Description
AddTag ( string tag ) : void

Tags must be added BEFORE anything is logged. Once the first event is logged, the tags are locked

Debug ( string loggerName, string>.IDictionary fields ) : void
Debug ( string loggerName, string message ) : void
Error ( string loggerName, string>.IDictionary fields ) : void
Error ( string loggerName, string message ) : void
Fatal ( string loggerName, string>.IDictionary fields ) : void
Fatal ( string loggerName, string message ) : void
Info ( string loggerName, string>.IDictionary fields ) : void
Info ( string loggerName, string message ) : void
Init ( Session session, IEncompassConfig config, ICollection tags = null ) : void

Initializes the loggly logger

Log ( string>.IDictionary fields, string loggerName, string level ) : void
SetPostUrl ( string url ) : void
SetSize ( int queueSize ) : void
Warn ( string loggerName, string>.IDictionary fields ) : void
Warn ( string loggerName, string message ) : void

Private Methods

Method Description
LogDebug ( ) : bool
LogError ( ) : bool
LogFatal ( ) : bool
LogInfo ( ) : bool
LogWarn ( ) : bool
Loggly ( string url, int queueSize = DEFAULT_QUEUE_SIZE ) : EllieMae.Encompass.Client
MakeTagCsv ( ) : string
PopulateEvent ( string>.IDictionary fields, string loggerName, string level ) : void

Method Details

AddTag() public static method

Tags must be added BEFORE anything is logged. Once the first event is logged, the tags are locked
public static AddTag ( string tag ) : void
tag string
return void

Debug() public static method

public static Debug ( string loggerName, string>.IDictionary fields ) : void
loggerName string
fields string>.IDictionary
return void

Debug() public static method

public static Debug ( string loggerName, string message ) : void
loggerName string
message string
return void

Error() public static method

public static Error ( string loggerName, string>.IDictionary fields ) : void
loggerName string
fields string>.IDictionary
return void

Error() public static method

public static Error ( string loggerName, string message ) : void
loggerName string
message string
return void

Fatal() public static method

public static Fatal ( string loggerName, string>.IDictionary fields ) : void
loggerName string
fields string>.IDictionary
return void

Fatal() public static method

public static Fatal ( string loggerName, string message ) : void
loggerName string
message string
return void

Info() public static method

public static Info ( string loggerName, string>.IDictionary fields ) : void
loggerName string
fields string>.IDictionary
return void

Info() public static method

public static Info ( string loggerName, string message ) : void
loggerName string
message string
return void

Init() public static method

Initializes the loggly logger
public static Init ( Session session, IEncompassConfig config, ICollection tags = null ) : void
session Session Current encompass session, used to load the config file
config IEncompassConfig Config file to load. Will re-initialize when this is used.
tags ICollection Collection of loggly tags. If null, we will load the Loggly.Tags element from the config.
return void

Log() public static method

public static Log ( string>.IDictionary fields, string loggerName, string level ) : void
fields string>.IDictionary
loggerName string
level string
return void

SetPostUrl() public static method

public static SetPostUrl ( string url ) : void
url string
return void

SetSize() public static method

public static SetSize ( int queueSize ) : void
queueSize int
return void

Warn() public static method

public static Warn ( string loggerName, string>.IDictionary fields ) : void
loggerName string
fields string>.IDictionary
return void

Warn() public static method

public static Warn ( string loggerName, string message ) : void
loggerName string
message string
return void

Property Details

LOGGLY_ALL public_oe static_oe property

public static string LOGGLY_ALL
return string

LOGGLY_DEBUG public_oe static_oe property

public static string LOGGLY_DEBUG
return string

LOGGLY_ERROR public_oe static_oe property

public static string LOGGLY_ERROR
return string

LOGGLY_FATAL public_oe static_oe property

public static string LOGGLY_FATAL
return string

LOGGLY_INFO public_oe static_oe property

public static string LOGGLY_INFO
return string

LOGGLY_TAGS public_oe static_oe property

public static string LOGGLY_TAGS
return string

LOGGLY_URL public_oe static_oe property

public static string LOGGLY_URL
return string

LOGGLY_WARN public_oe static_oe property

public static string LOGGLY_WARN
return string