Permalink
Browse files

nette addon

  • Loading branch information...
juzna committed Aug 1, 2012
1 parent 78d84cc commit de582a82114f991916b8e1645a6ac14758672465
Showing with 15 additions and 2 deletions.
  1. +7 −0 Bazo/Watchdog/NetteLogger.php
  2. +8 −2 composer.json
@@ -32,4 +32,11 @@ public function log($message, $priority = self::INFO)
$this->watchdogClient->logNette($message, $level);
return $res;
}
+
+
+
+ public static function register(Client $watchdogClient)
+ {
+ \Nette\Diagnostics\Debugger::$logger = new static($watchdogClient);
+ }
}
View
@@ -1,6 +1,6 @@
{
"name": "bazo/watchdog-client",
- "type": "library",
+ "type": "nette-addon",
"description": "Logging to Watchdog service for PHP 5.3",
"keywords": ["log","logging","watchdog"],
"homepage": "https://github.com/bazo/watchdog-client",
@@ -12,9 +12,15 @@
}
],
"require": {
- "php": ">=5.3.0"
+ "php": ">=5.3.0",
+ "nette/addon-installer": "@dev"
},
"autoload": {
"psr-0": { "Bazo\\Watchdog": "" }
+ },
+ "extra": {
+ "nette-addon": {
+ "initializer": "Bazo\\Watchdog\\NetteLogger::register"
+ }
}
}

0 comments on commit de582a8

Please sign in to comment.