[ https://issues.apache.org/jira/browse/TS-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14682255#comment-14682255 ]
ASF GitHub Bot commented on TS-306: ----------------------------------- Github user SolidWallOfCode commented on a diff in the pull request: https://github.com/apache/trafficserver/pull/274#discussion_r36781478 --- Diff: proxy/logging/LogFile.cc --- @@ -754,115 +585,33 @@ LogFile::display(FILE *fd) fprintf(fd, "Logfile: %s, %s\n", get_name(), (is_open()) ? "file is open" : "file is not open"); } -/*************************************************************************** - LogFileList IS NOT USED -****************************************************************************/ - - -/**************************************************************************** - - MetaInfo methods - -*****************************************************************************/ - -void -MetaInfo::_build_name(const char *filename) +bool +LogFile::is_open() { - int i = -1, l = 0; - char c; - while (c = filename[l], c != 0) { - if (c == '/') { - i = l; - } - ++l; - } - - // 7 = 1 (dot at beginning) + 5 (".meta") + 1 (null terminating) - // - _filename = (char *)ats_malloc(l + 7); - - if (i < 0) { - ink_string_concatenate_strings(_filename, ".", filename, ".meta", NULL); - } else { - memcpy(_filename, filename, i + 1); - ink_string_concatenate_strings(&_filename[i + 1], ".", &filename[i + 1], ".meta", NULL); - } + if (m_file_format == LOG_FILE_PIPE) + return (m_fd >= 0); --- End diff -- 'return m_fd >= 0;' > 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 > Assignee: Daniel Xu > Labels: newbie > Fix For: 6.1.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)