Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem with syslog-ng. I want to make syslog-ng to format the logs like below:


But it logs without the "\". Just "011". Example:

Expected: 2012-11-28\\01116:33:51\\011host_name\\011app_name[26250]: message

Happened: 2012-11-2801116:33:51011host_name011app_name[26250]: message

Edit: I tried template_escape() and flags() methods, but no luck. Any ideas will be appreciated. Thanks in advance.

share|improve this question
What happens if you insert two (e.g '\\') ? – cstamas Nov 30 '12 at 8:13
I'm sorry, I edited the post, there should be two '\'s ;) – mtndesign Nov 30 '12 at 9:29

Take a look at the template_escape() option.

share|improve this answer
I tried it, but unfortunately no luck. – mtndesign Nov 30 '12 at 9:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.