Skip to content

Commit

Permalink
Array export fix if text not contains message key.
Browse files Browse the repository at this point in the history
  • Loading branch information
niksamokhvalov committed Jan 21, 2020
1 parent 32f047b commit 1d6cea7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.idea
*.iml
/vendor
codecept.phar
composer.lock
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change log

## 1.4.2 - 2020-01-21
### Fixed
* Array export fix if text not contains message key.

## 1.4.1 - 2019-11-06
### Fixed
* Fix passing client options to sentry.
Expand Down
1 change: 1 addition & 0 deletions src/SentryTarget.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public function export()

$data = [
'level' => static::getLevelName($level),
'message' => '',
'timestamp' => $timestamp,
'tags' => ['category' => $category]
];
Expand Down
13 changes: 12 additions & 1 deletion tests/commands/SentryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public function actionFill()

foreach ($this->logsProvider() as $log) {
\Yii::getLogger()->log($log['message'], $log['level'], $log['category']);
unset($log);
}

\Yii::getLogger()->flush();
Expand Down Expand Up @@ -54,7 +55,17 @@ protected function logsProvider()
'level' => Logger::LEVEL_WARNING,
'message' => 'Invalid request',
'category' => 'UI'
]
],
[
'level' => null,
'message' => [1, 2, 3],
'category' => null
],
[
'level' => '',
'message' => ['one' => 'value 1', 'two' => 'value 2'],
'category' => null
],
];
}
}

0 comments on commit 1d6cea7

Please sign in to comment.