src/Services/LogCapsule.php
/**
     * Adds the attributes to the logs.
     *
     * @return callable
     */
Adds the attributes to the logs.
@return callable
Adds the attributes to the logs . @return callable
private static function datadogProcessor(): callable
    {
        return function ($entry) {
            $payload = [
                'message' => $entry['message'],
                'level' => $entry['level'],
                'severity' => $entry['level_name'],
                'timestamp' => self::dateToString($entry['datetime']),
            ];
            if (empty($entry['context']) === false) {
                $payload = array_merge($payload, $entry['context']);
            }
            return array_merge($payload, self::getTraces());
        };
    }
private static function datadogProcessor ( ) : callable { return function ( $ entry ) { $ payload = [ 'message' => $ entry [ 'message' ] , 'level' => $ entry [ 'level' ] , 'severity' => $ entry [ 'level_name' ] , 'timestamp' => self :: dateToString ( $ entry [ 'datetime' ] ) , ] ; if ( empty ( $ entry [ 'context' ] ) === false ) { $ payload = array_merge ( $ payload , $ entry [ 'context' ] ) ; } return array_merge ( $ payload , self :: getTraces ( ) ) ; } ; }
Adds the attributes to the logs.
Adds the attributes to the logs .