I'm struggling with getting logging scopes working (CakePHP 2.2.2). Copying 
the example in 
docs<http://book.cakephp.org/2.0/en/core-libraries/logging.html#logging-scopes> 
doesn't 
seem to work as it should:

// configure tmp/logs/shops.log to receive all types (log levels), but only// 
those with `orders` and `payments` scopeCakeLog::config('shops', array(
    'engine' => 'FileLog',
    'types' => array(),
    'scopes' => array('orders', 'payments'),
    'file' => 'shops.log',));
// configure tmp/logs/payments.log to receive all types, but only// those with 
`payments` scopeCakeLog::config('shops', array(
    'engine' => 'FileLog',
    'types' => array(),
    'scopes' => array('payments'),
    'file' => 'payments.log',));
CakeLog::warning('this gets written only to shops.log', 
'orders');CakeLog::warning('this gets written to both shops.log and 
payments.log', 'payments');CakeLog::warning('this gets written to both 
shops.log and payments.log', 'unknown');

All I get is payments.log with all three messages and no shops.log. Any 
ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to