<?php

use apexl\Io\modules\logger\enums\LogLevel;
use function apexl\io\env;

$level = env('LOG__GLOBAL_LEVEL', LogLevel::WARNING);
if (!$level instanceof LogLevel) {
    $level = LogLevel::from($level);
}

return [
    "level" => $level,
    "enable_dynamic_streams" => filter_var(env('LOG__ENABLE_DYNAMIC_STREAMS', true), FILTER_VALIDATE_BOOL),
    "warn_about_dynamic_streams" => filter_var(env('LOG__WARN_ABOUT_DYNAMIC_STREAMS', false), FILTER_VALIDATE_BOOL),
    "catch_errors" => filter_var(env('LOG__CATCH_ERRORS', true), FILTER_VALIDATE_BOOL),
    'directory' => env('LOG__DIRECTORY', 'log'),
    "streams" => [
    ]
];
