[ 
https://issues.apache.org/jira/browse/TS-2150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14597926#comment-14597926
 ] 

ASF GitHub Bot commented on TS-2150:
------------------------------------

Github user SolidWallOfCode commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/229#discussion_r33062790
  
    --- Diff: proxy/logging/LogField.cc ---
    @@ -212,6 +269,51 @@ LogField::~LogField()
       ats_free(m_symbol);
     }
     
    +TransactionMilestones::Milestone
    +LogField::milestone_from_m_name(const char *m_name)
    +{
    +  milestone_map::iterator it;
    +  TransactionMilestones::Milestone result = 
TransactionMilestones::LAST_ENTRY;
    +
    +  it = m_milestone_map.find(m_name);
    +  if (it != m_milestone_map.end())
    +    result = it->second;
    +
    +  return result;
    +}
    +
    +int
    +LogField::milestones_from_m_name(const char *m_name, 
TransactionMilestones::Milestone *ms1, TransactionMilestones::Milestone *ms2)
    +{
    +  milestone_map::iterator it;
    +  char *ms_name;
    +  size_t ms_name_len, skip;
    +
    +  ms_name_len = strcspn(m_name, " -");
    +  ms_name = strndup(m_name, ms_name_len);
    +  it = m_milestone_map.find(ms_name);
    +  free(ms_name);
    +  if (it != m_milestone_map.end()) {
    +    *ms1 = it->second;
    +  } else {
    +    for (it = m_milestone_map.begin(); it != m_milestone_map.end(); ++it)
    --- End diff --
    
    What is this point of this loop, if it returns on the first iteration?


> Add Milestone log tags
> ----------------------
>
>                 Key: TS-2150
>                 URL: https://issues.apache.org/jira/browse/TS-2150
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Logging
>            Reporter: Leif Hedstrom
>            Assignee: John Rushford
>             Fix For: sometime
>
>
> We have a notion of milestones in the core, and plugin APIs 
> (TSHttpTxnMilestoneGet() ). It'd be useful to expose these milestone timers 
> as a log tag, something like:
> {code}
> %<{UA_BEGIN}mtms>
> {code}
> mtms is just an example / suggestion, "MilestoneTimeMilliSecond", we can make 
> it whatever we like.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to