[
https://issues.apache.org/jira/browse/TS-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15240088#comment-15240088
]
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_r59632366
--- Diff: lib/ts/Diags.cc ---
@@ -716,14 +722,12 @@ Diags::should_roll_outputlog()
bool ret_val = false;
bool need_consider_stderr = true;
- /*
log_log_trace("should_roll_outputlog() was called\n");
- log_log_trace("rolling_enabled = %d, output_rolling_size = %d,
output_rolling_interval = %d\n", outputlog_rolling_enabled,
- outputlog_rolling_size, outputlog_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) -
outputlog_time_last_roll);
- log_log_trace("stdout_log = %p\n", stdout_log);
- */
+ log_log_trace("should_roll_outputlog(): rolling_enabled = %d,
output_rolling_size = %d, output_rolling_interval = %d\n",
--- End diff --
I think ``log_log_trace`` ought to be something you can set at runtime.
Probably an environment variable or something that sets a global flag?
> 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)