Skip to content

v2.3.10

Choose a tag to compare

@srinathreddydudi srinathreddydudi released this 25 Oct 04:37
8417d2c

What's Changed

Full Changelog: v2.3.9...v2.3.10

Example Usage

$logs = [
    [
        'level' => 'INFO', // allowed values: DEBUG, NOTICE, INFO, WARNING, ERROR, ALERT, CRITICAL, EMERGENCY
        'message' => 'custom log 1',
        'type' => 'custom logs',
        'written_at' => \Carbon\Carbon::parse('2025-10-24 12:55:55'),
        'context' => [
            'user_id' => 1,
            'account_id' => 2
        ]
    ],
    [
        'level' => 'WARNING',
        'message' => 'custom log 2',
        'type' => 'custom logs',
        'written_at' => \Carbon\Carbon::parse('2025-10-24 12:55:55'),
        'context' => [
            'user_id' => 1,
            'account_id' => 2
        ]
    ]
];

$laritor = new \BinaryBuilds\LaritorClient\Laritor();

foreach ($logs as $log) {
    $laritor->addCustomLog(
        $log['type'],
        $log['level'],
        $log['message'],
        $log['context'],
        $log['written_at']
    );
}

$laritor->sendEvents();