@lorenzo, probably not in this simple use case, but how about this one:

```php
// in AppController
public $components = ['Flash' => ['log' => ['level' => 'flash', 'scope' => ['user']]];

// then in any controller
$this->Flash->set('The was an error operating the heavy machinery, please try to oil it again', ['log' => 'The user 1 tried to operate the heavy machinery please contact him immediately']);
//or
$this->Flash->set('{{username}}, the file compression ({{id}}) failed.', ['log' => true, 'username' => $user['username'], 'id' => $file['id']]);