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

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

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

    https://github.com/apache/trafficserver/pull/568#discussion_r59629895
  
    --- Diff: lib/ts/Diags.cc ---
    @@ -642,10 +642,10 @@ Diags::should_roll_diagslog()
       bool ret_val = false;
     
       log_log_trace("should_roll_diagslog() was called\n");
    -  log_log_trace("rolling_enabled = %d, output_rolling_size = %d, 
output_rolling_interval = %d\n", diagslog_rolling_enabled,
    -                diagslog_rolling_size, diagslog_rolling_interval);
    -  log_log_trace("RollingEnabledValues::ROLL_ON_TIME = %d\n", 
RollingEnabledValues::ROLL_ON_TIME);
    -  log_log_trace("time(0) - last_roll_time = %d\n", time(0) - 
diagslog_time_last_roll);
    +  log_log_trace("should_roll_diagslog(): rolling_enabled = %d, 
output_rolling_size = %d, output_rolling_interval = %d\n",
    +                diagslog_rolling_enabled, diagslog_rolling_size, 
diagslog_rolling_interval);
    +  log_log_trace("should_roll_diagslog(): 
RollingEnabledValues::ROLL_ON_TIME = %d\n", RollingEnabledValues::ROLL_ON_TIME);
    +  log_log_trace("should_roll_diagslog(): time(0) - last_roll_time = %d\n", 
time(0) - diagslog_time_last_roll);
    --- End diff --
    
    Use __func__ to generate the function name.


> Diagnostic log rolling races
> ----------------------------
>
>                 Key: TS-4072
>                 URL: https://issues.apache.org/jira/browse/TS-4072
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Logging
>            Reporter: James Peach
>            Assignee: Daniel Xu
>             Fix For: 6.2.0
>
>
> When diagnostic logs are rolled, {{Diags::diags_log}} is deleted and replaced 
> with a new log object. Since the global {{diags}} points to a a single 
> {{Diags}} object there is nothing to prevent a different thread logging 
> through this object at the time it is deleted.



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

Reply via email to