diff --git a/monolog/application.log b/monolog/application.log new file mode 100644 index 0000000..e69de29 diff --git a/monolog/index.php b/monolog/index.php new file mode 100644 index 0000000..ecf3897 --- /dev/null +++ b/monolog/index.php @@ -0,0 +1,21 @@ +register(new Silex\Extension\MonologExtension(), array( + 'monolog.class_path' => __DIR__.'/vendor/monolog/src', + 'monolog.logfile' => __DIR__.'/application.log', +)); + +$app->get('/hello', function() use ($app) { + $app['monolog']->addDebug('currently at hello'); + return 'Hello World!'; +}); + +$app->get('/error', function() { + throw new RuntimeException('Some error'); +}); + +$app->run(); diff --git a/monolog/vendors.sh b/monolog/vendors.sh new file mode 100755 index 0000000..786e0d9 --- /dev/null +++ b/monolog/vendors.sh @@ -0,0 +1,2 @@ +#!/bin/sh +git clone https://github.com/Seldaek/monolog.git vendor/monolog