ElasticLogger

ElasticSearch logger implementation.

Messages are queued and written to the server when any of the following conditions are met:

  • The message queue is full.
  • The message to be logged has a LogLevel of critical or higher.
  • A message is queued to be logged, and more time than the maxLogInterval constructor argument has passed.
  • The logger is asked to log the message "Main thread exiting".

The name of the index that the logger writes messages to is determined by a function (the indexCreator constructor argument). This usually returns an index name based off of the current time.

Constructors

this
this(ElasticInfo elasticInfo, IndexCreator indexCreator, Duration maxLogInterval, size_t messageQueueSize)

Members

Functions

beginLine
void beginLine(LogLine line)
Undocumented in source. Be warned that the author may not have intended to support it.
endLine
void endLine()
Undocumented in source. Be warned that the author may not have intended to support it.
put
void put(const(char)[] text)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta