Skip to content

Commit

Permalink
Fix Phar path mappings and split Monolog configuration between dev an…
Browse files Browse the repository at this point in the history
…d prod
  • Loading branch information
tehplague committed Mar 11, 2024
1 parent 1230622 commit 6c5eecb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 19 deletions.
39 changes: 20 additions & 19 deletions config/packages/monolog.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event"]
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]
when@dev:
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event"]
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]

when@prod:
monolog:
Expand Down
5 changes: 5 additions & 0 deletions src/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ class Kernel extends BaseKernel
{
use MicroKernelTrait;

public function getProjectDir(): string
{
return \dirname(__DIR__);
}

protected function build(ContainerBuilder $container): void
{
if (!$this->debug) {
Expand Down

0 comments on commit 6c5eecb

Please sign in to comment.