Skip to content

Conversation

@8ctopus
Copy link
Contributor

@8ctopus 8ctopus commented Sep 9, 2022

I've added code to check if the log is empty and where the log file is. Here's how I use it:

    foreach ($container['logger']->getBuckets() as $bucket) {
        // check not empty and at least warning (4)
        if (get_class($bucket) === 'Apix\\Log\\Logger\\File' && !$bucket->isEmpty()) {
            if (!$file = $bucket->getDestination()) {
                continue;
            }

            // get log content
            $content = file_get_contents($file, false);

           // send log by email
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant