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

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

Github user danobi commented on the pull request:

    https://github.com/apache/trafficserver/pull/363#issuecomment-162035450
  
    It is marked private. Would your suggestion still be to nest everything 
inside the `if (blf != NULL)`? I don't see any reason to keep 
`ink_assert(diags_log == NULL)` since the condition is always true b/c in the 
constructor we explicitly set `diags_log` to NULL. 


> Incorrect ink_assert behavior in Diags.cc
> -----------------------------------------
>
>                 Key: TS-4054
>                 URL: https://issues.apache.org/jira/browse/TS-4054
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Logging
>            Reporter: Daniel Xu
>             Fix For: 6.1.0
>
>
> In `lib/ts/Diags.cc:setup_diagslog()`, the statement `ink_assert(diags_log == 
> NULL)` is incorrect. It should instead be: `if (blf == NULL) return`
> We should not use an assert here either because when the function is passed a 
> NULL `blf`, it means that some test doesn't want to use the diags.log log 
> file and we should just not set up diagslog.



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

Reply via email to