Skip to content

Instantly share code, notes, and snippets.

@derekperkins
Created May 16, 2014 20:25
Show Gist options
  • Save derekperkins/12c926d9a35cfc534389 to your computer and use it in GitHub Desktop.
Save derekperkins/12c926d9a35cfc534389 to your computer and use it in GitHub Desktop.
if (Configure::read('env') == 'prod') {
CakeLog::config('debug', [
'engine' => 'Syslog',
'types' => ['notice', 'info', 'debug'],
'file' => 'debug',
]);
CakeLog::config('error', [
'engine' => 'Syslog',
'types' => ['warning', 'error', 'critical', 'alert', 'emergency'],
'file' => 'error',
]);
} else {
CakeLog::config('debug', [
'engine' => 'File',
'types' => ['notice', 'info', 'debug'],
'file' => 'debug',
]);
CakeLog::config('error', [
'engine' => 'File',
'types' => ['warning', 'error', 'critical', 'alert', 'emergency'],
'file' => 'error',
]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment