elastic / apm-agent-php

Apache License 2.0
252 stars 69 forks source link

Improve logger performance by removing unnecessary line prefix generation #1068

Closed intuibase closed 11 months ago

intuibase commented 11 months ago

Optimization involves generating a prefix for each log line only if the 'display' criteria are met. If the log level is too low or the log is disabled - the function will not be executed.

This will save on fetching local time, process id and on generating strings.