mirror of
https://github.com/zhamao-robot/zhamao-logger.git
synced 2026-07-02 14:25:40 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30bee20a0a | ||
|
|
d13c8fb85f | ||
|
|
c21ddda192 |
@@ -25,7 +25,7 @@
|
|||||||
],
|
],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.2 || ^7.3 || ^7.4 || ^8.0 || ^8.1",
|
"php": "^7.2 || ^7.3 || ^7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3 || ^8.4 || ^8.5",
|
||||||
"psr/log": "^1 || ^2 || ^3",
|
"psr/log": "^1 || ^2 || ^3",
|
||||||
"symfony/polyfill-mbstring": "^1.0"
|
"symfony/polyfill-mbstring": "^1.0"
|
||||||
},
|
},
|
||||||
@@ -37,9 +37,9 @@
|
|||||||
"ext-mbstring": "Use C/C++ extension instead of polyfill will be more efficient"
|
"ext-mbstring": "Use C/C++ extension instead of polyfill will be more efficient"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"friendsofphp/php-cs-fixer": "^3.2",
|
"friendsofphp/php-cs-fixer": "^3.64",
|
||||||
"phpstan/phpstan": "^1.1",
|
"phpstan/phpstan": "^1.12",
|
||||||
"phpunit/phpunit": "^8.5 || ^9.0",
|
"phpunit/phpunit": "^9.0",
|
||||||
"roave/security-advisories": "dev-latest",
|
"roave/security-advisories": "dev-latest",
|
||||||
"brainmaestro/composer-git-hooks": "^2.8"
|
"brainmaestro/composer-git-hooks": "^2.8"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ use Psr\Log\LogLevel;
|
|||||||
|
|
||||||
class ConsoleLogger extends AbstractLogger
|
class ConsoleLogger extends AbstractLogger
|
||||||
{
|
{
|
||||||
public const VERSION = '1.1.7';
|
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