Skip to content

Commit

Permalink
Removed deprecated Logger log level feature
Browse files Browse the repository at this point in the history
  • Loading branch information
foxycode committed Jan 10, 2021
1 parent d8931b0 commit f7734cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
7 changes: 1 addition & 6 deletions .docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,8 @@ And add this to your `@layout` footer (before `</body>`):
## Tracy

```php
$logLevel = [ // default (NULL means default)
\Tracy\Logger::CRITICAL,
\Tracy\Logger::EXCEPTION,
\Tracy\Logger::ERROR,
];
$appName = 'PHP Application'; // default (NULL means default)
$license = 'your_licence_key';

\Contributte\NewRelic\Tracy\Bootstrap::init($logLevel, $appName, $license); // all parameters are optional
\Contributte\NewRelic\Tracy\Bootstrap::init($appName, $license); // all parameters are optional
```
13 changes: 2 additions & 11 deletions src/Tracy/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ class Bootstrap
{

/**
* @param string[]|array|NULL $logLevel (null for default - error and critical)
* @param string|NULL $appName
* @param string|NULL $license
*/
public static function init(?array $logLevel = null, $appName = null, $license = null)
public static function init($appName = null, $license = null)
{
static::check();

Expand All @@ -29,15 +28,7 @@ public static function init(?array $logLevel = null, $appName = null, $license =

static::setup($appName, $license);

if ($logLevel === null) {
$logLevel = [
Logger::CRITICAL,
Logger::EXCEPTION,
Logger::ERROR,
];
}

$logger = new Logger($logLevel);
$logger = new Logger(null);
Debugger::setLogger($logger);
}

Expand Down

0 comments on commit f7734cc

Please sign in to comment.