[
https://issues.apache.org/jira/browse/MESOS-3772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14975263#comment-14975263
]
Joris Van Remoortere commented on MESOS-3772:
---------------------------------------------
{code}
commit d69e786e3c0117f9ef85e97d65147ea5d34e2d57
Author: Neil Conway <[email protected]>
Date: Mon Oct 26 17:13:55 2015 -0500
Fixed quotation of interpolated variables in log messages.
Specifically, we should always quote executor IDs (because they are
user-supplied and might contain whitespace), but we don't need to quote
framework IDs. There's a bunch more work we could do here (e.g.,
escaping punctuation), but this is a start.
Also fix a few style issues with usage of "<<" operators.
Review: https://reviews.apache.org/r/39497
{code}
> Consistency of quoted strings in error messages
> -----------------------------------------------
>
> Key: MESOS-3772
> URL: https://issues.apache.org/jira/browse/MESOS-3772
> Project: Mesos
> Issue Type: Bug
> Reporter: Neil Conway
> Labels: mesosphere, newbie, tech-debt
>
> Example log output:
> {quote}
> I1020 18:56:02.933956 1790 slave.cpp:1270] Got assigned task 13 for
> framework 496620b9-4368-4a71-b741-68216f3d909f-0000
> I1020 18:56:02.934185 1790 slave.cpp:1386] Launching task 13 for framework
> 496620b9-4368-4a71-b741-68216f3d909f-0000
> I1020 18:56:02.934408 1790 slave.cpp:1618] Queuing task '13' for executor
> default of framework '496620b9-4368-4a71-b741-68216f3d909f-0000
> I1020 18:56:02.935417 1790 slave.cpp:1760] Sending queued task '13' to
> executor 'default' of framework 496620b9-4368-4a71-b741-68216f3d909f-0000
> {quote}
> Aside from the typo (unmatched quote) in the third line, these log messages
> using quoting inconsistently: sometimes task, executor, and framework IDs are
> quoted, other times they are not.
> We should probably adopt a general rule, a la
> http://www.postgresql.org/docs/9.4/static/error-style-guide.html . My
> proposal: when interpolating a variable, only use quotes if it is possible
> that the value might contain whitespace or punctuation (in the latter case,
> the punctuation should probably be escaped).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)