timrutte/laminas-log-processor-aws-ec2-instance-id

Log processor to add the AWS EC2 instance id to the logger

v1 2023-03-02 19:29 UTC

This package is auto-updated.

Last update: 2024-05-04 15:42:17 UTC


README

Installation

Run the following to install this library:

$ composer require timrutte/laminas-log-processor-aws-ec2-instance-id

Usage

$logger = new \Laminas\Log\Logger();
$logger->addProcessor(new \TimRutte\Laminas\Log\Processor\AwsEc2InstanceId());
$writer = new \Laminas\Log\Writer\Stream();
$formatter = new \Laminas\Log\Formatter\Json();
$writer->setFormatter($formatter);
$logger->addWriter($writer);

Support