log\Target setLevels()

setLevels() public method

Sets the message levels that this target is interested in.

The parameter can be either an array of interested level names or an integer representing the bitmap of the interested level values. Valid level names include: 'error', 'warning', 'info', 'trace' and 'profile'; valid level values include: yii\log\Logger::LEVEL_ERROR, yii\log\Logger::LEVEL_WARNING, yii\log\Logger::LEVEL_INFO, yii\log\Logger::LEVEL_TRACE and yii\log\Logger::LEVEL_PROFILE.

For example,

['error', 'warning']
// which is equivalent to:
Logger::LEVEL_ERROR | Logger::LEVEL_WARNING
public void setLevels ( $levels )
$levels array|integer

Message levels that this target is interested in.

throws yii\base\InvalidConfigException

if $levels value is not correct.

doc_Yii
2016-10-30 17:07:00
Comments
Leave a Comment

Please login to continue.