nettrine/orm – vypnuti logu SQL dotazů do debug.log
- motorcb
- Člen | 552
Zdravím,
rozběhnul jsem nettrine/orm ale na webhostingu mi to loguje všechny SQL
dotazy do souboru /log/debug.log
Jde to nějak vypnout? Docela to bobtná :-)
common.neon:
parameters:
database:
driver: pdo_mysql
host: localhost
dbname: aaa
user: bbb
password: ccc
application:
errorPresenter: Error
mapping:
*: [App, Modules\*, Presenters\*Presenter]
database:
dsn: '%database.driver%:host=%database.host%;dbname=%database.dbname%'
user: %database.user%
password: %database.password%
session:
expiration: 14 days
# Extension > Nettrine
extensions:
contributte.monolog: Contributte\Monolog\DI\MonologExtension
nettrine.annotations: Nettrine\Annotations\DI\AnnotationsExtension
nettrine.cache: Nettrine\Cache\DI\CacheExtension
nettrine.migrations: Nettrine\Migrations\DI\MigrationsExtension
nettrine.fixtures: Nettrine\Fixtures\DI\FixturesExtension
# Dbal
nettrine.dbal: Nettrine\DBAL\DI\DbalExtension
nettrine.dbal.console: Nettrine\DBAL\DI\DbalConsoleExtension(%consoleMode%)
# Orm
nettrine.orm: Nettrine\ORM\DI\OrmExtension
nettrine.orm.cache: Nettrine\ORM\DI\OrmCacheExtension
nettrine.orm.console: Nettrine\ORM\DI\OrmConsoleExtension(%consoleMode%)
nettrine.orm.annotations: Nettrine\ORM\DI\OrmAnnotationsExtension
nettrine.dbal:
debug:
panel: %debugMode%
configuration:
sqlLogger: Nettrine\DBAL\Logger\PsrLogger(@Monolog\Logger)
connection:
driver: %database.driver%
host: %database.host%
user: %database.user%
password: %database.password%
dbname: %database.dbname%
charset: UTF8
nettrine.orm:
entityManagerDecoratorClass: App\Model\Database\EntityManager
configuration:
autoGenerateProxyClasses: %debugMode%
nettrine.orm.annotations:
mapping:
App\Model\Database\Entity: %appDir%/Model/Database/Entity
nettrine.migrations:
table: doctrine_migrations
column: version
directory: db/Migrations
namespace: Database\Migrations
versionsOrganization: null
nettrine.fixtures:
paths:
- /db/Fixtures
decorator:
Doctrine\Common\EventSubscriber:
tags: [nettrine.subscriber]
services:
- Nettrine\Migrations\Subscriber\FixPostgreSQLDefaultSchemaSubscriber
contributte.monolog:
holder:
enabled: true
channel:
default:
handlers:
- Monolog\Handler\RotatingFileHandler(%appDir%/../log/syslog.log, 30, Monolog\Logger::WARNING)
processors:
- Monolog\Processor\WebProcessor()
- Monolog\Processor\IntrospectionProcessor()
- Monolog\Processor\MemoryPeakUsageProcessor()
- Monolog\Processor\ProcessIdProcessor()
Díky
- Martin Vágovszký
- Člen | 14
Ahoj, mě pomohlo zakomentovat sqlLogger:
nettrine.dbal:
debug:
panel: %debugMode%
#configuration:
# sqlLogger: Nettrine\DBAL\Logger\PsrLogger(@Monolog\Logger)