2

(I am testing on Asterisk 11.7.0~dfsg-1ubuntu1)

I am using the following format to append to a logfile, according to the documentation:

same => n,Set(FILE(/tmp/mylog.txt,,,a)=my-log-message)

But this does not append a newline. So I am trying:

same => n,Set(FILE(/tmp/mylog.txt,,,al)=my-log-message)

But this does not append (instead, it just overwrites - surprisingly, since the documentation says that this should append!).

How can I append and make sure that a newline is added after the log message?

blueFast
  • 4,200
  • 13
  • 37
  • 54

1 Answers1

1

Try this:

same => n,Set(FILE(/tmp/mylog.txt,,,al,u)=my-log-message)
Falcon Momot
  • 25,244
  • 15
  • 63
  • 92
  • 2
    Welcome to Server Fault! It looks like you may have the knowledge to provide good Answer here, but please consider reading [How do I write a good Answer?](http://serverfault.com/help/how-to-answer) in our help center and then revise the Answer. Your Commands/Code/Settings may technically be the solution but some explanation is welcome. Thanks in advance. - Also it is convention to format commands/configuration settings as code: http://serverfault.com/editing-help – HBruijn Nov 13 '15 at 07:57