C# Class LogentriesCore.Net.AsyncLogger

Show file Open project: palette-software/le_dotnet Class Usage Examples

Public Properties

Property Type Description
m_Debug bool

Protected Properties

Property Type Description
ASCII System.Text.ASCIIEncoding
IsRunning bool
Queue BlockingCollection
Random Random
TrimChars char[]
UTF8 UTF8Encoding
WorkerThread Thread
line_separator string
posix_newline string[]

Public Methods

Method Description
AddLine ( string line ) : void
AreAllQueuesEmpty ( System.TimeSpan waitTime ) : bool

Determines if the queue is empty after waiting the specified waitTime. Returns true or false if the underlying queues are empty.

AsyncLogger ( ) : System
IsNullOrWhiteSpace ( String value ) : bool
LoadCredentials ( ) : bool
getAccountKey ( ) : string
getDataHubAddr ( ) : String
getDataHubPort ( ) : int
getDebug ( ) : bool
getHostName ( ) : String
getImmediateFlush ( ) : bool
getIsUsingDataHab ( ) : bool
getLocation ( ) : String
getLogID ( ) : String
getToken ( ) : String
getUseHostName ( ) : bool
getUseHttpPut ( ) : bool
getUseSsl ( ) : bool
interruptWorker ( ) : void
setAccountKey ( String accountKey ) : void
setDataHubAddr ( String dataHubAddr ) : void
setDataHubPort ( int port ) : void
setDebug ( bool debug ) : void
setHostName ( String hostName ) : void
setImmediateFlush ( bool immediateFlush ) : void
setIsUsingDataHub ( bool useDataHub ) : void
setLocation ( String location ) : void
setLogID ( String logID ) : void
setToken ( String token ) : void
setUseHostName ( bool useHostName ) : void
setUseHttpPut ( bool useHttpPut ) : void
setUseSsl ( bool useSsl ) : void

Protected Methods

Method Description
CloseConnection ( ) : void
GetIsValidGuid ( string guidString ) : bool
OpenConnection ( ) : void
ReopenConnection ( ) : void
Run ( ) : void
WriteDebugMessages ( string message ) : void
WriteDebugMessages ( string message, Exception ex ) : void

Private Methods

Method Description
CheckIfHostNameValid ( String hostName ) : bool
retrieveSetting ( String name ) : string

Method Details

AddLine() public method

public AddLine ( string line ) : void
line string
return void

AreAllQueuesEmpty() public static method

Determines if the queue is empty after waiting the specified waitTime. Returns true or false if the underlying queues are empty.
public static AreAllQueuesEmpty ( System.TimeSpan waitTime ) : bool
waitTime System.TimeSpan The length of time the method should block before giving up waiting for it to empty.
return bool

AsyncLogger() public method

public AsyncLogger ( ) : System
return System

CloseConnection() protected method

protected CloseConnection ( ) : void
return void

GetIsValidGuid() protected method

protected GetIsValidGuid ( string guidString ) : bool
guidString string
return bool

IsNullOrWhiteSpace() public static method

public static IsNullOrWhiteSpace ( String value ) : bool
value String
return bool

LoadCredentials() public method

public LoadCredentials ( ) : bool
return bool

OpenConnection() protected method

protected OpenConnection ( ) : void
return void

ReopenConnection() protected method

protected ReopenConnection ( ) : void
return void

Run() protected method

protected Run ( ) : void
return void

WriteDebugMessages() protected method

protected WriteDebugMessages ( string message ) : void
message string
return void

WriteDebugMessages() protected method

protected WriteDebugMessages ( string message, Exception ex ) : void
message string
ex Exception
return void

getAccountKey() public method

public getAccountKey ( ) : string
return string

getDataHubAddr() public method

public getDataHubAddr ( ) : String
return String

getDataHubPort() public method

public getDataHubPort ( ) : int
return int

getDebug() public method

public getDebug ( ) : bool
return bool

getHostName() public method

public getHostName ( ) : String
return String

getImmediateFlush() public method

public getImmediateFlush ( ) : bool
return bool

getIsUsingDataHab() public method

public getIsUsingDataHab ( ) : bool
return bool

getLocation() public method

public getLocation ( ) : String
return String

getLogID() public method

public getLogID ( ) : String
return String

getToken() public method

public getToken ( ) : String
return String

getUseHostName() public method

public getUseHostName ( ) : bool
return bool

getUseHttpPut() public method

public getUseHttpPut ( ) : bool
return bool

getUseSsl() public method

public getUseSsl ( ) : bool
return bool

interruptWorker() public method

public interruptWorker ( ) : void
return void

setAccountKey() public method

public setAccountKey ( String accountKey ) : void
accountKey String
return void

setDataHubAddr() public method

public setDataHubAddr ( String dataHubAddr ) : void
dataHubAddr String
return void

setDataHubPort() public method

public setDataHubPort ( int port ) : void
port int
return void

setDebug() public method

public setDebug ( bool debug ) : void
debug bool
return void

setHostName() public method

public setHostName ( String hostName ) : void
hostName String
return void

setImmediateFlush() public method

public setImmediateFlush ( bool immediateFlush ) : void
immediateFlush bool
return void

setIsUsingDataHub() public method

public setIsUsingDataHub ( bool useDataHub ) : void
useDataHub bool
return void

setLocation() public method

public setLocation ( String location ) : void
location String
return void

setLogID() public method

public setLogID ( String logID ) : void
logID String
return void

setToken() public method

public setToken ( String token ) : void
token String
return void

setUseHostName() public method

public setUseHostName ( bool useHostName ) : void
useHostName bool
return void

setUseHttpPut() public method

public setUseHttpPut ( bool useHttpPut ) : void
useHttpPut bool
return void

setUseSsl() public method

public setUseSsl ( bool useSsl ) : void
useSsl bool
return void

Property Details

ASCII protected static property

protected static ASCIIEncoding,System.Text ASCII
return System.Text.ASCIIEncoding

IsRunning protected property

protected bool IsRunning
return bool

Queue protected property

protected BlockingCollection Queue
return BlockingCollection

Random protected property

protected Random Random
return Random

TrimChars protected static property

protected static char[] TrimChars
return char[]

UTF8 protected static property

protected static UTF8Encoding UTF8
return UTF8Encoding

WorkerThread protected property

protected Thread WorkerThread
return Thread

line_separator protected static property

protected static string line_separator
return string

m_Debug public property

public bool m_Debug
return bool

posix_newline protected static property

protected static string[] posix_newline
return string[]