query-log doc
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Namespaces

  • Phramework
    • QueryLog

Classes

  • QueryLog
  • QueryLogAdapter

Namespace Phramework\QueryLog

Classes summary

QueryLog

This package wraps phramework's database adapter and keeps logs of the executed queries and it's parameters. The presence of this package once activated won't affect the rest of the system.
Defined settings:

  • boolean disabled, [Optional], default is false
  • object database, database settings
    • string adapter, IAdapter's implementation class path
      Example:
      'adapter' => 'Phramework\\Database\\MySQL',
    • string name, Database name
    • string username
    • string password
    • string host
    • integer port
    • string table, [Optional], Table name, default is `"query_log"`
    • string schema, [Optional], Tables schema, default is null
  • object matrix, [Optional], Log level matrix, using this matrix queries from specific or all class methods can be excluded from logging. The log will be excluded if the above have a non positive value and they are contained in the current backtrace.
    Example:
    'matrix' => (object)[
          'MyNamespace\\MyClass' => false,
          'MyNamespace\\MySecondClass' => (object)[
              'GET' => false
          ],
      ],
QueryLogAdapter

QueryLogAdapter is an implementation of IAdapter which uses an existing adapter to execute the called methods while logging the query in a different adapter.

query-log doc API documentation generated by ApiGen