<div dir="ltr"><div>Steven,</div><div><br></div><div>Spot on.</div><div><br></div>Also some pro tips on logging.<div><br></div><div>1) You can use ESL or a C module to do logging as you see fit.  You get a callback with all the pieces of the data and you can write any format you want.  fs_cli does this via ESL and mod_logfile does it via C.</div><div>2) There is another module called mod_syslog that will write to syslog also prepending the date to everything.</div><div>3) The mod_graylog that Chris mentioned sounds pretty interesting and is also taking advantage of the raw data.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 18, 2016 at 7:09 AM, Steven Ayre <span dir="ltr">&lt;<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:12.8px">Even the Freeswitch docs don&#39;t know what&#39;s what ... &quot; The log file<br></span><span style="font-size:12.8px">will contain log lines in this general format: YYYY-MM-DD hh:mm:ss<br></span><span style="font-size:12.8px">[LEVEL] source_file_name:line_number function_name() &lt;log data&gt;&quot; ,<br></span><span style="font-size:12.8px">that statement is not true.  That&#39;s not the general format. its not<br></span><span style="font-size:12.8px">even the dominant format, infact in my logs, lines that start</span></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:12.8px">YYYY-MM-DD are a rarity !</span></blockquote></span><div><br>The dominant logging format is going to be the session log as most messages will relate to a call. So the majority of log lines will start with the UUID, if that is enabled.<br></div><div><br></div><div>The aren&#39;t that many logging formats. There is logging against a session (has UUID) or a global log (no UUID). Both have clean variants (no datetime information). So both UUID and datetime are optional. Other than that it&#39;s consistent.</div><div><br></div><div>Anything else is likely to come from libraries used by FreeSWITCH that don&#39;t go through that logging system.</div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 14 January 2016 at 10:12, Tim Smith <span dir="ltr">&lt;<a href="mailto:randomdev4@gmail.com" target="_blank">randomdev4@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Moises,<br>
<br>
Thank you for your reply, you&#39;re the only person who read my post and<br>
didn&#39;t somehow think I was saying &quot;remove the UUIDs&quot; !  ;-)<br>
<br>
Regarding : &quot;Consistency is good, but certain functionality cannot be<br>
<span>provided if every single line has exactly the same format.&quot;<br>
<br>
</span>Yes, but the inconsistency makes it painful, verging on impossible, to<br>
correctly integrate with various log parsing systems, whether Splunk,<br>
Logstash or otherwise.<br>
<br>
<br>
If the devs have some personal preference for one format here, another<br>
format there, and something else over there, I would unfortunatley<br>
still call that a whim, especially as there is no clear documentation<br>
on the matter either !!!!<br>
<br>
Even the Freeswitch docs don&#39;t know what&#39;s what ... &quot; The log file<br>
will contain log lines in this general format: YYYY-MM-DD hh:mm:ss<br>
[LEVEL] source_file_name:line_number function_name() &lt;log data&gt;&quot; ,<br>
that statement is not true.  That&#39;s not the general format. its not<br>
even the dominant format, infact in my logs, lines that start<br>
YYYY-MM-DD are a rarity !<br>
<br>
<br>
I have not come accross any other product (either closed or open<br>
source) that has the quite same amount of randomness in the way it<br>
logs.   That is what I find so frustrating.<br>
<div><div><br>
On 14 January 2016 at 07:05, Moises Silva &lt;<a href="mailto:moises.silva@gmail.com" target="_blank">moises.silva@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Why do log lines start with UUID ?  Its format is hard to define and<br>
&gt;&gt; subject to the developer&#39;s whims ....why not start the line with a<br>
&gt;&gt; date, like almost any other sane program,  and put the UUID elsewhere<br>
&gt;&gt; ?<br>
&gt;<br>
&gt;<br>
&gt; If you don&#39;t like the uuid at the front, just remove it from the<br>
&gt; logfile.conf.xml configuration<br>
&gt;<br>
&gt; &lt;param name=&quot;uuid&quot; value=&quot;false&quot; /&gt;<br>
&gt;<br>
&gt; You&#39;ve clearly not attempted to debug complex scenarios, where the uuid at<br>
&gt; the front is more useful, because when you have hundreds or thousands of<br>
&gt; calls and you are trying to figure out what happened with a particular call<br>
&gt; leg, you search for the uuid first, date second.<br>
&gt;<br>
&gt; The format you despise, is terribly useful, so try to understand it rather<br>
&gt; than just hate it because is different to what you&#39;re used to.<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Why on earth is the log format so inconsistent ? e.g.<br>
&gt;&gt;<br>
&gt;&gt; Sometimes developers feel like giving us a date ....<br>
&gt;&gt;<br>
&gt;&gt; 7d28af7d-XXXX-XXXX-XXXX-2e20e2bXXXX 2016-01-13 12:00:47.198394 [DEBUG]<br>
&gt;&gt; switch_core_state_machine.c:636<br>
&gt;&gt;<br>
&gt;&gt; Sometimes they even manage the date in a sensible location ....<br>
&gt;&gt;<br>
&gt;&gt; 2016-01-13 11:58:14.838392 [DEBUG] sofia.c:9124<br>
&gt;&gt;<br>
&gt;&gt; Other times they can&#39;t be bothered to provide such a critical piece of<br>
&gt;&gt; information.....<br>
&gt;&gt;<br>
&gt;&gt; 4891efd5-XXXX-XXXX-XXXX-58d153b8XXXX Dialplan: sofia/internal/<br>
&gt;<br>
&gt;<br>
&gt; This is by design, not a whim, and many of us like it, makes routing logs<br>
&gt; easy to spot. Some people instead of calling these design decisions whims,<br>
&gt; actually provided a solution so it fits what they prefer:<br>
&gt;<br>
&gt; <a href="https://freeswitch.org/jira/browse/FS-6805" rel="noreferrer" target="_blank">https://freeswitch.org/jira/browse/FS-6805</a><br>
&gt; <a href="https://freeswitch.org/stash/projects/FS/repos/freeswitch/pull-requests/44/overview" rel="noreferrer" target="_blank">https://freeswitch.org/stash/projects/FS/repos/freeswitch/pull-requests/44/overview</a><br>
&gt;<br>
&gt; So you can add this to switch.conf.xml:<br>
&gt;<br>
&gt; &lt;param name=&quot;dialplan-timestamps&quot; value=&quot;true&quot;/&gt;<br>
&gt;<br>
&gt; And you get the behavior you want. Please spend the time learning the<br>
&gt; software rather than blaming the devs because you can&#39;t understand it or<br>
&gt; because they have preferences different than yours.<br>
&gt;<br>
&gt;&gt; Please devs... spend a little time cleaning up the logging ... it<br>
&gt;&gt; helps debugging and troubleshooting so much if we have some<br>
&gt;&gt; consistency there !!!!!<br>
&gt;<br>
&gt;<br>
&gt; Consistency is good, but certain functionality cannot be provided if every<br>
&gt; single line has exactly the same format. Some log lines are not associated<br>
&gt; to a session, so they can&#39;t have a uuid at all. The FreeSWITCH logs are as<br>
&gt; consistent as is possible in a given context.<br>
&gt;<br>
</div></div><div><div>&gt; _________________________________________________________________________<br>
&gt; Professional FreeSWITCH Consulting Services:<br>
&gt; <a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
&gt; <a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
&gt;<br>
&gt; Official FreeSWITCH Sites<br>
&gt; <a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
&gt; <a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
&gt; <a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
&gt;<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br></div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬<div><br><div>☞ <a href="http://freeswitch.org/" target="_blank">http://freeswitch.org/</a>  ☞ <a href="http://cluecon.com/" target="_blank">http://cluecon.com/</a>  ☞ <a href="http://twitter.com/FreeSWITCH" target="_blank">http://twitter.com/FreeSWITCH</a></div><div><div>☞ <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch ☞ <u><a href="http://freeswitch.org/g+" target="_blank">http://freeswitch.org/g+</a></u><br><br></div><div>ClueCon Weekly Development Call <br></div><div>☎ <a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a>  ☎ +19193869900 </div><div><br></div></div></div><div><a href="https://www.youtube.com/watch?v=9XXgW34t40s" style="color:rgb(17,85,204);font-size:12.8000001907349px" target="_blank">https://www.youtube.com/watch?v=9XXgW34t40s</a></div><div><a href="https://www.youtube.com/watch?v=NLaDpGQuZDA" target="_blank">https://www.youtube.com/watch?v=NLaDpGQuZDA</a><br></div></div></div></div></div></div></div>
</div>