<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"><<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a>></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't know what's what ... " 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() <log data>" ,<br></span><span style="font-size:12.8px">that statement is not true. That'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'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's consistent.</div><div><br></div><div>Anything else is likely to come from libraries used by FreeSWITCH that don'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"><<a href="mailto:randomdev4@gmail.com" target="_blank">randomdev4@gmail.com</a>></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're the only person who read my post and<br>
didn't somehow think I was saying "remove the UUIDs" ! ;-)<br>
<br>
Regarding : "Consistency is good, but certain functionality cannot be<br>
<span>provided if every single line has exactly the same format."<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't know what's what ... " 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() <log data>" ,<br>
that statement is not true. That'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 <<a href="mailto:moises.silva@gmail.com" target="_blank">moises.silva@gmail.com</a>> wrote:<br>
>> Why do log lines start with UUID ? Its format is hard to define and<br>
>> subject to the developer's whims ....why not start the line with a<br>
>> date, like almost any other sane program, and put the UUID elsewhere<br>
>> ?<br>
><br>
><br>
> If you don't like the uuid at the front, just remove it from the<br>
> logfile.conf.xml configuration<br>
><br>
> <param name="uuid" value="false" /><br>
><br>
> You've clearly not attempted to debug complex scenarios, where the uuid at<br>
> the front is more useful, because when you have hundreds or thousands of<br>
> calls and you are trying to figure out what happened with a particular call<br>
> leg, you search for the uuid first, date second.<br>
><br>
> The format you despise, is terribly useful, so try to understand it rather<br>
> than just hate it because is different to what you're used to.<br>
><br>
>><br>
>> Why on earth is the log format so inconsistent ? e.g.<br>
>><br>
>> Sometimes developers feel like giving us a date ....<br>
>><br>
>> 7d28af7d-XXXX-XXXX-XXXX-2e20e2bXXXX 2016-01-13 12:00:47.198394 [DEBUG]<br>
>> switch_core_state_machine.c:636<br>
>><br>
>> Sometimes they even manage the date in a sensible location ....<br>
>><br>
>> 2016-01-13 11:58:14.838392 [DEBUG] sofia.c:9124<br>
>><br>
>> Other times they can't be bothered to provide such a critical piece of<br>
>> information.....<br>
>><br>
>> 4891efd5-XXXX-XXXX-XXXX-58d153b8XXXX Dialplan: sofia/internal/<br>
><br>
><br>
> This is by design, not a whim, and many of us like it, makes routing logs<br>
> easy to spot. Some people instead of calling these design decisions whims,<br>
> actually provided a solution so it fits what they prefer:<br>
><br>
> <a href="https://freeswitch.org/jira/browse/FS-6805" rel="noreferrer" target="_blank">https://freeswitch.org/jira/browse/FS-6805</a><br>
> <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>
><br>
> So you can add this to switch.conf.xml:<br>
><br>
> <param name="dialplan-timestamps" value="true"/><br>
><br>
> And you get the behavior you want. Please spend the time learning the<br>
> software rather than blaming the devs because you can't understand it or<br>
> because they have preferences different than yours.<br>
><br>
>> Please devs... spend a little time cleaning up the logging ... it<br>
>> helps debugging and troubleshooting so much if we have some<br>
>> consistency there !!!!!<br>
><br>
><br>
> Consistency is good, but certain functionality cannot be provided if every<br>
> single line has exactly the same format. Some log lines are not associated<br>
> to a session, so they can't have a uuid at all. The FreeSWITCH logs are as<br>
> consistent as is possible in a given context.<br>
><br>
</div></div><div><div>> _________________________________________________________________________<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>
<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>