You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "kang li (JIRA)" <ji...@apache.org> on 2014/09/12 11:33:33 UTC

[jira] [Commented] (TS-306) enable log rotation for diags.log

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

kang li commented on TS-306:
----------------------------

I'm now working at this issue. There are two common ways to do log rotation.

1. Use pipe for log rotation
Pro:
Easy to configure
Could take advantage of several logging tools, ie. cronolog, multilog.
Con:
Need additional processes to do logging.

2. Use logrotate for log rotation
Pro:
System level log rotation management.
Con:
Need extra configuration.
Need to figure out how to reload log files.

I prefer to use pipe to do log rotation as it’s easy to use. Is there any concern for the pipe file? Any suggestions would be appreciated.

Comment from [~bcall]:
I would lean towards using inotify/kqueue to see if the file has been removed or renamed and then reopen the file.  There is more overhead and more complexity with the external tools with the pipe approach.

-Bryan

> enable log rotation for diags.log
> ---------------------------------
>
>                 Key: TS-306
>                 URL: https://issues.apache.org/jira/browse/TS-306
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Logging
>            Reporter: Miles Libbey
>            Priority: Critical
>             Fix For: 5.3.0
>
>
> (from yahoo bug 913896)
> Original description
> by Leif Hedstrom 3 years ago at 2006-12-04 12:42
> There might be reasons why this file might get filled up, e.g. libraries used by plugins producing output on STDOUT/STDERR. A few suggestions have been
> made, to somehow rotate traffic.out. One possible solution (suggested by Ryan) is to use cronolog (http://cronolog.org/), which seems like a fine idea.
> 		
>  
> Comment 1
>  by Joseph Rothrock  2 years ago at 2007-10-17 09:13:24
> Maybe consider rolling diags.log as well. -Feature enhancement.
> 		
> Comment 2
>  by Kevin Dalley 13 months ago at 2009-03-04 15:32:18
> When traffic.out gets filled up, error.log stops filing up, even though rotation is turned on. This is
> counter-intuitive.  Rotation does not control traffic.out, but a large traffic.out will stop error.log from being
> written.
> 		



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