<commit_before><?php

namespace Vistik\Checks;

use Exception;
use Illuminate\Support\Facades\DB;

class DatabaseOnline extends HealthCheck
{

    public function run(): bool
    {
        try {
            if (DB::connection()->getPdo()) {
                return true;
            }
        } catch (Exception $e) {
            $this->setError($e->getMessage());
        }

        return false;
    }
}<commit_msg>log what db driver we are trying to check<commit_after><?php

namespace Vistik\Checks;

use Exception;
use Illuminate\Support\Facades\DB;

class DatabaseOnline extends HealthCheck
{

    public function run(): bool
    {
        try {
            $this->log("Trying to connect to database using driver: " . DB::connection()->getDriverName());
            if (DB::connection()->getPdo()) {
                return true;
            }
        } catch (Exception $e) {
            $this->setError($e->getMessage());
        }

        return false;
    }
}
{'fraction_non_alphanumeric': 0.12396694214876033, 'fraction_numerical': 0.0, 'mean_word_length': 2.028125, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2949359', 'n_tokens_mistral': 273, 'n_tokens_neox': 271, 'n_words': 68}