Skip to content

Commit 6b8010d

Browse files
committed
upsome for display list
1 parent 80ede13 commit 6b8010d

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/Component/Formatter/SingleList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class SingleList extends MessageFormatter
3535
*
3636
* @return int|string
3737
*/
38-
public static function show($data, string $title = '', array $opts = [])
38+
public static function show($data, string $title = 'Information', array $opts = [])
3939
{
4040
$string = '';
4141
$opts = array_merge([

src/Concern/FormatOutputAwareTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function section(string $title, $body, array $opts = []): void
200200
* @param string $title
201201
* @param array $opts
202202
*/
203-
public function aList($data, string $title = '', array $opts = []): void
203+
public function aList($data, string $title = 'Information', array $opts = []): void
204204
{
205205
SingleList::show($data, $title, $opts);
206206
}

src/Console.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,15 @@ public static function newApp(
9999
*/
100100
public static function logf(int $level, string $format, ...$args): void
101101
{
102-
$levelName = self::LEVEL_NAMES[$level] ?? 'INFO';
103-
$colorName = self::LEVEL2TAG[$level] ?? 'info';
102+
$levelName = self::LEVEL_NAMES[$level] ?? 'INFO';
103+
$colorName = self::LEVEL2TAG[$level] ?? 'info';
104+
104105
$taggedName = ColorTag::add($levelName, $colorName);
105106

106-
$message = strpos($format, '%') > 0 ? sprintf($format, ...$args) : $format;
107+
$datetime = date('Y/m/d H:i:s');
108+
$message = strpos($format, '%') > 0 ? sprintf($format, ...$args) : $format;
107109

108-
self::writef('[%s] %s', $taggedName, $message);
110+
self::writef('%s [%s] %s', $datetime, $taggedName, $message);
109111
}
110112

111113
/**

0 commit comments

Comments
 (0)