Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
forecho committed Mar 21, 2020
1 parent 3df2d39 commit bab3596
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Yii::info([

// short_message will contain 'Test short message',
// two additional fields will be sent,
// full_message will contain all other stuff without 'short' and 'add':
// full_message will contain all other stuff without 'short' and 'additional':
// string representation of ['test1' => 123, 'test2' => 456]
Yii::info([
'test1' => 123,
Expand Down
4 changes: 2 additions & 2 deletions src/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ public static function writeLog(string $name, array $message)
$argOffset = 0;

// $message['trace_id'] = request()->requestId; todo

$message['short'] = ArrayHelper::remove($message, (string)(0 + $argOffset));
$message['full'] = ArrayHelper::remove($message, (string)(1 + $argOffset));
$message['additional'] = ArrayHelper::remove($message, (string)(2 + $argOffset));
$category = ArrayHelper::remove($message, (string)(3 + $argOffset), 'graylog');

$category = ArrayHelper::remove($message, (string)(3 + $argOffset), 'graylog');

$level = self::mapYiiLevel($name);

\Yii::getLogger()->log($message, $level, $category);
Expand Down

0 comments on commit bab3596

Please sign in to comment.