SimplePsrFileLoggerTest
extends TestCase
-
#[CoversClass]
-
\OpenTelemetry\SDK\Logs\SimplePsrFileLogger::class
Table of Contents
Constants
-
LOG_FILE
= 'test.log'
-
LOG_LEVELS
= [\Psr\Log\LogLevel::EMERGENCY, \Psr\Log\LogLevel::ALERT, \Psr\Log\LogLevel::CRITICAL, \Psr\Log\LogLevel::ERROR, \Psr\Log\LogLevel::WARNING, \Psr\Log\LogLevel::NOTICE, \Psr\Log\LogLevel::INFO, \Psr\Log\LogLevel::DEBUG]
-
LOG_PATH
= self::ROOT_DIR . '/' . self::LOG_FILE
-
ROOT_DIR
= 'var'
Properties
-
$logger
: SimplePsrFileLogger
-
$root
: vfsStreamDirectory
Methods
-
logLevelProvider()
: array<string|int, mixed>
-
setUp()
: void
-
test_log()
: void
-
test_log_invalid_json()
: void
-
test_log_invalid_log_level()
: void
LOG_FILE
private
mixed
LOG_FILE
= 'test.log'
LOG_LEVELS
private
mixed
LOG_LEVELS
= [\Psr\Log\LogLevel::EMERGENCY, \Psr\Log\LogLevel::ALERT, \Psr\Log\LogLevel::CRITICAL, \Psr\Log\LogLevel::ERROR, \Psr\Log\LogLevel::WARNING, \Psr\Log\LogLevel::NOTICE, \Psr\Log\LogLevel::INFO, \Psr\Log\LogLevel::DEBUG]
LOG_PATH
private
mixed
LOG_PATH
= self::ROOT_DIR . '/' . self::LOG_FILE
ROOT_DIR
private
mixed
ROOT_DIR
= 'var'
logLevelProvider()
public
static logLevelProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>
setUp()
public
setUp() : void
test_log()
public
test_log(string $logLevel) : void
Parameters
-
$logLevel
: string
-
-
#[DataProvider]
-
'logLevelProvider'
test_log_invalid_json()
public
test_log_invalid_json() : void
test_log_invalid_log_level()
public
test_log_invalid_log_level() : void