# How to implement SysLog in cakephp 3

**URL:** <https://discourse.cakephp.org/t/how-to-implement-syslog-in-cakephp-3/637>\
**Category:** Uncategorized\
**Created:** [June 27, 2016, 4:59pm UTC](https://discourse.cakephp.org/t/how-to-implement-syslog-in-cakephp-3/637 "2016-06-27T16:59:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yusuf\_cse](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/yusuf_cse/32/270_2.png) [@yusuf\_cse](https://discourse.cakephp.org/u/yusuf_cse)\
**Post date:** [June 27, 2016, 4:59pm UTC](https://discourse.cakephp.org/t/how-to-implement-syslog-in-cakephp-3/637/1 "2016-06-27T16:59:44Z")

</div>

Hi  
I need to use syslog in production environment. what i have to do to enable this feature in cakephp 3.x?

But now i have used normal file log and write arl error in the error.log file. This is configured like this what i am giving in following

‘Log’ =\> [  
‘debug’ =\> [  
‘className’ =\> ‘Cake\Log\Engine\FileLog’,  
‘path’ =\> LOGS,  
‘file’ =\> ‘debug’,  
‘levels’ =\> [‘notice’, ‘info’, ‘debug’],  
],  
‘error’ =\> [  
‘className’ =\> ‘Cake\Log\Engine\FileLog’,  
‘path’ =\> LOGS,  
‘file’ =\> ‘error’,  
‘levels’ =\> [‘warning’, ‘error’, ‘critical’, ‘alert’, ‘emergency’],  
],  
],

would i have to delete this code if i want to implement syslog or anything else? please advice me.

---

<div class="post-metadata">

**Author:** ![yusuf\_cse](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/yusuf_cse/32/270_2.png) [@yusuf\_cse](https://discourse.cakephp.org/u/yusuf_cse)\
**Post date:** [June 28, 2016, 11:58am UTC](https://discourse.cakephp.org/t/how-to-implement-syslog-in-cakephp-3/637/2 "2016-06-28T11:58:52Z")

</div>

Got solution like that

To enable the syslog past the following code in the config/app.php file

‘Log’ =\> [‘error’ =\> [ ‘engine’ =\> ‘Syslog’, ‘levels’ =\> [‘emergency’, ‘alert’, ‘critical’, ‘error’], ‘format’ =\> “%s: My-App - %s”, ‘prefix’ =\> ‘Web Server 01’, ] ],

remember comments the normal error configurations as well. you can use log function to write error.
