N
N
Ninazu2016-07-25 12:23:55
Yii
Ninazu, 2016-07-25 12:23:55

How to view logs from another domain in Yii2?

Logs are written to the database

'log' => [
  'targets' => [
      'db' => [
        'class' => 'yii\log\DbTarget',
        'levels' => ['error', 'warning'],
      ],
  ],
],
'modules' => [
  'debug' => [
    'class' => 'yii\debug\Module'
  ],
],

There are two domains. With one database. On one of them the debug module is enabled , on the second it is disabled. Both write logs to the database. But from the second domain I can only see my own logs.
How to configure the debug component to display logs from both domains

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kim, 2016-08-07
@kimono

Try playing with the log directory:

'modules' => [
  'debug' => [
    'class' => 'yii\debug\Module',
    'dataPath' => '@runtime/debug', // --- вот здесь
  ],
],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question