Warning
The Coralogix PHP SDK will End of Life(EOL) Feb 1st 2024.
For PHP 7.4+, please use the Coralogix’s PHP OpenTelemetry Instrumentation Documentation instead.
Symfony2 integration¶
For using our logger with Symfony
you should to edit your default monolog.yaml file and add our handler:
monolog:
handlers:
main:
type: stream
path: %kernel.logs_dir%/%kernel.environment%.log
level: debug
coralogix:
type: service
id: coralogix_handler
services:
coralogix_handler:
class: Coralogix\Handlers\CoralogixMonologHandler
arguments:
private_key: [YOUR_PRIVATE_KEY_HERE]
app_name: [YOUR_APPLICATION_NAME]
subsystem: [YOUR_SUBSYSTEM_NAME]