You are here

public function LagoonLogstashFormatter::__construct in Lagoon Logs 7

Parameters

string $applicationName the application that sends the data, used as the "type" field of logstash:

string $systemName the system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine:

File

lib/LagoonLogstashFormatter.php, line 13

Class

LagoonLogstashFormatter

Code

public function __construct($applicationName, $systemName = null) {

  // logstash requires a ISO 8601 format date with optional millisecond precision.
  //    parent::__construct('Y-m-d\TH:i:s.uP');
  $this->systemName = $systemName ?: gethostname();
  $this->applicationName = $applicationName;
}