25 @unlink(sys_get_temp_dir().
'/monolog_dedup.log');
33 $this->assertTrue(
$test->hasInfoRecords());
34 $this->assertTrue(
$test->hasDebugRecords());
35 $this->assertFalse(
$test->hasWarningRecords());
45 @unlink(sys_get_temp_dir().
'/monolog_dedup.log');
53 $this->assertTrue(
$test->hasErrorRecords());
54 $this->assertTrue(
$test->hasCriticalRecords());
55 $this->assertFalse(
$test->hasWarningRecords());
74 $this->assertFalse(
$test->hasErrorRecords());
75 $this->assertFalse(
$test->hasCriticalRecords());
76 $this->assertFalse(
$test->hasWarningRecords());
91 $record[
'datetime']->modify(
'+62seconds');
94 $record[
'datetime']->modify(
'+62seconds');
99 $this->assertTrue(
$test->hasErrorRecords());
100 $this->assertTrue(
$test->hasCriticalRecords());
101 $this->assertFalse(
$test->hasWarningRecords());
113 @unlink(sys_get_temp_dir().
'/monolog_dedup.log');
118 $record[
'datetime']->modify(
'-1day -10seconds');
121 $record2[
'datetime']->modify(
'-1day -10seconds');
124 $record3[
'datetime']->modify(
'-30seconds');
130 $record[
'datetime']->getTimestamp() .
":ERROR:test\n" .
131 $record2[
'datetime']->getTimestamp() .
":CRITICAL:test\n" .
132 $record3[
'datetime']->getTimestamp() .
":CRITICAL:test\n",
133 file_get_contents(sys_get_temp_dir() .
'/monolog_dedup.log')
135 $this->assertTrue(
$test->hasErrorRecords());
136 $this->assertTrue(
$test->hasCriticalRecords());
137 $this->assertFalse(
$test->hasWarningRecords());
141 $this->assertFalse(
$test->hasErrorRecords());
142 $this->assertFalse(
$test->hasCriticalRecords());
151 $record3[
'datetime']->getTimestamp() .
":CRITICAL:test\n" .
152 $record[
'datetime']->getTimestamp() .
":ERROR:test\n" .
153 $record2[
'datetime']->getTimestamp() .
":CRITICAL:test\n",
154 file_get_contents(sys_get_temp_dir() .
'/monolog_dedup.log')
156 $this->assertTrue(
$test->hasErrorRecords());
157 $this->assertTrue(
$test->hasCriticalRecords());
158 $this->assertFalse(
$test->hasWarningRecords());
163 @unlink(sys_get_temp_dir().
'/monolog_dedup.log');
const DEBUG
Detailed debug information.
testFlushPassthruIfLogTooOld()
Monolog::flush Monolog::appendRecord Monolog::isDuplicate testFlushPassthruIfEmptyLog ...
const ERROR
Runtime errors.
getRecord($level=Logger::WARNING, $message='test', $context=array())
testFlushPassthruIfEmptyLog()
Monolog::flush Monolog::appendRecord
static tearDownAfterClass()
Simple handler wrapper that deduplicates log records across multiple requests.
testFlushSkipsIfLogExists()
Monolog::flush Monolog::appendRecord Monolog::isDuplicate testFlushPassthruIfEmptyLog ...
testFlushPassthruIfAllRecordsUnderTrigger()
Monolog::flush
const CRITICAL
Critical conditions.
Used for testing purposes.
testGcOldLogs()
Monolog::flush Monolog::appendRecord Monolog::isDuplicate Monolog::collectLogs ...
const INFO
Interesting events.