Summary:ASTERISK-02109: ast_verbose() duplicate log messages if there is no "\n" at the end of the string.
Reporter:Dmytro Mishchenko (arkadia)Labels:
Date Opened:2004-07-26 06:24:19Date Closed:2011-06-07 14:10:01
Versions:Frequency of
Description:I have the following code in my C application:

       ast_verbose (VERBOSE_PREFIX_3 "hi");
       ast_verbose (VERBOSE_PREFIX_3 "bye");

When its being executed on console I see:
   -- hi    -- hi    -- bye    -- hi    -- bye
in logs:
Jul 26 06:53:30 VERBOSE[1186191296]:     -- hiJul 26 06:53:31 VERBOSE[1186191296]:     -- hi    -- byeJul 26 06:53:31 VERBOSE[1186191296]:     -- hi    -- bye

At the same such code works fine without duplications:
       ast_verbose (VERBOSE_PREFIX_3 "hi\n");
       ast_verbose (VERBOSE_PREFIX_3 "bye\n");

Comments:By: Olle Johansson (oej) 2004-07-26 08:27:57

Always report according to instructions at http://www.digium.com/bugtracker.html

* Version of Asterisk
* Platform

By: Brian West (bkw918) 2004-07-26 09:00:50

I have seen this too.  But never took the time to track it down.

By: Dmytro Mishchenko (arkadia) 2004-07-26 09:04:03

I have it with:
RedHat 9.0

By: Mark Spencer (markster) 2004-07-27 00:23:42

It's just a limitation of the way ast_verbose works.  You have to put something with a trailing \n or it's basically meaningless.