mirror of
https://github.com/zhamao-robot/zhamao-logger.git
synced 2026-07-02 14:25:40 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30bee20a0a |
@@ -10,7 +10,7 @@ use Psr\Log\LogLevel;
|
|||||||
|
|
||||||
class ConsoleLogger extends AbstractLogger
|
class ConsoleLogger extends AbstractLogger
|
||||||
{
|
{
|
||||||
public const VERSION = '1.1.8';
|
public const VERSION = '1.1.9';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日志输出格式
|
* 日志输出格式
|
||||||
@@ -258,14 +258,14 @@ class ConsoleLogger extends AbstractLogger
|
|||||||
try {
|
try {
|
||||||
// use stream
|
// use stream
|
||||||
if ($this->stream) {
|
if ($this->stream) {
|
||||||
@fwrite($this->stream, $output);
|
fwrite($this->stream, $output);
|
||||||
@fflush($this->stream);
|
fflush($this->stream);
|
||||||
} else {
|
} else {
|
||||||
if ($level <= 4 && $this->use_stderr) {
|
if ($level <= 4 && $this->use_stderr) {
|
||||||
@fwrite(STDERR, $output);
|
fwrite(STDERR, $output);
|
||||||
} else {
|
} else {
|
||||||
// use plain text output
|
// use plain text output
|
||||||
@echo $output;
|
echo $output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user