summaryrefslogtreecommitdiffstats
path: root/support/rotatelogs.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* rotatelogs: Log the current file size and error code/descriptionJeff Trawick2008-04-101-6/+25
| | | | | | | | | | | | when failing to write to the log file. Sometimes users have a hard time believing that their little log file was really big enough to reach quota/filesystem/other limit back at the time of the error. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@646845 13f79535-47bb-0310-9956-ffa450edef68
* Add in new option for rotatelogs: -fJim Jagielski2008-02-291-17/+43
| | | | | | | | | | This forces rotatelogs to create the logfile as soon as started not as soon as it sees it's first line of input. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@632355 13f79535-47bb-0310-9956-ffa450edef68
* * Don't leak memory when reopening the logfile.Ruediger Pluem2008-01-281-1/+10
| | | | | | | | | PR: 40183 Submitted by: rpluem, Takashi Sato <serai lans-tv.com> Reviewed by: rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@615901 13f79535-47bb-0310-9956-ffa450edef68
* - when using "-l" reduce two consecutive calls to apr_time_now() to one.Ruediger Pluem2007-12-011-21/+17
| | | | | | | | | | | | | | | | | | | | | | This will not change the logic if no "-l" gets used, and it will spare one call to apr_time_now() in case "-l" gets used and more important it gives the code better atomicity, because in fact between the two calls there is a slight change of jumping oder the DST boundary - for historic reasons the same code block is used two times with a slightly different way of transforming apr_time_t to int (once division by APR_USEC_PER_SEC, once call to apr_time_sec()), so let's unify it. - finally move the block into a function, because it gets used already two times. PR: 44004 Submitted by: Rainer Jung <rainer.jung kippdata.de> Reviewed by: rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@600154 13f79535-47bb-0310-9956-ffa450edef68
* Allow local timestamps to be used when rotating based on file size.Jeff Trawick2007-11-201-20/+23
| | | | | | | | IOW, accept and respect either -l or UTC offset when rotating based on file size. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@596796 13f79535-47bb-0310-9956-ffa450edef68
* improve command-line parsingJeff Trawick2007-11-201-46/+71
| | | | | | | | | | | | | example invocations now flagged as invalid: specifying UTC offset with size-based rotation specifying -l with size-based rotation specifying both -l and UTC offset range checking of integer parameters not attempted; basic data type issues may need to be addressed first such as the use of unsigned int for max file size git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@596698 13f79535-47bb-0310-9956-ffa450edef68
* increase size of error string buffer passed to apr_strerror();Jeff Trawick2006-12-111-1/+1
| | | | | | | | 120 is the size most frequently used in Apache; APR provides no hints git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@485828 13f79535-47bb-0310-9956-ffa450edef68
* * support/rotatelogs.c (main): Produce useful error message for open()Joe Orton2006-11-221-9/+16
| | | | | | | | | failures. PR: 39487 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@478135 13f79535-47bb-0310-9956-ffa450edef68
* update license header textRoy T. Fielding2006-07-111-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
* Update the copyright year in all .c, .h and .xml filesColm MacCarthaigh2006-04-191-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
* No functional Change: Removing trailing whitespace. This alsoJim Jagielski2005-11-101-2/+2
| | | | | | | | means that "blank" lines consisting of just spaces or tabs are now really blank lines git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.Justin Erenkrantz2005-02-041-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
* make the check for GMT offset occur each time through the loop,Ken Coar2004-06-161-6/+11
| | | | | | | | | | | in case a switch between standard and daylight savings time occurred. (correction to previous code courtesy of Uli Zappe.) PR: 24417 Submitted by: Uli Zappe <uli ritual.org> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103973 13f79535-47bb-0310-9956-ffa450edef68
* oops; left over from an earlier versionKen Coar2004-06-141-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103945 13f79535-47bb-0310-9956-ffa450edef68
* add "-l" option to indicate interval is based on localtime not gmtKen Coar2004-06-111-11/+39
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103921 13f79535-47bb-0310-9956-ffa450edef68
* fix name of The Apache Software FoundationAndré Malo2004-02-091-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
* fix copyright dates according the first cehck inAndré Malo2004-02-081-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102592 13f79535-47bb-0310-9956-ffa450edef68
* apply Apache License, Version 2.0André Malo2004-02-061-51/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
* update license to 2004.André Malo2004-01-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
* finished that boring job:André Malo2003-02-031-1/+1
| | | | | | | | | update license to 2003. Happy New Year! ;-)) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
* Axe some warnings in rotatelogs which came when the program wasJeff Trawick2002-11-201-8/+4
| | | | | | | | | | | | | | | | | converted to use APR. The behaviors of apr_file_read() and apr_file_write() weren't taken completely into account. But note: In a couple of places the check "nRead < 0" was removed. While that is meaningless with APR and hasn't done anything useful in a long time, in Apache 1.3 days it was essentially a check for read-failed-with-EINTR. Apparently a rotation would occur if the read was interrupted by a signal. That function has been lost with the APR-ization. PR: 12617 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97570 13f79535-47bb-0310-9956-ffa450edef68
* Cleanup some type mismatch emits and consistify to our new apr time helpersWilliam A. Rowe Jr2002-06-141-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95675 13f79535-47bb-0310-9956-ffa450edef68
* Just quiet an annoying warning.Ryan Bloom2002-06-131-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95645 13f79535-47bb-0310-9956-ffa450edef68
* Added log rotation based on file size to the RotateLog support utility.Bradley Nicholes2002-06-121-17/+62
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95619 13f79535-47bb-0310-9956-ffa450edef68
* Oops, found another typoBradley Nicholes2002-06-111-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95614 13f79535-47bb-0310-9956-ffa450edef68
* Fixing a typoBradley Nicholes2002-06-111-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95613 13f79535-47bb-0310-9956-ffa450edef68
* Correct const'ness of argv in all support apps, and use the newWilliam A. Rowe Jr2002-04-131-3/+3
| | | | | | | | apr_app_initialize over apr_initialize for win32, and other platforms that may wish to tweak 'apr-ized' application support (e.g. Netware?) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94633 13f79535-47bb-0310-9956-ffa450edef68
* Update callers of apr_explode_gmt to apr_time_exp_gmt. TheSander Striker2002-03-211-1/+1
| | | | | | | | | function was renamed in apr. Submitted by: Thom May <thom@planetarytramp.net> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94081 13f79535-47bb-0310-9956-ffa450edef68
* Update our copyright for this year.Roy T. Fielding2002-03-131-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
* apr-utils rename apr_ansi_time_to_apr_time andIan Holsman2002-03-061-1/+1
| | | | | | | | | | | | apr_exploded_time_t. PR: Obtained from: Submitted by: Thom May <thom@planetarytramp.net> Reviewed by: Ian Holsman git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93733 13f79535-47bb-0310-9956-ffa450edef68
* Too many args is a bad thing too, some daysWilliam A. Rowe Jr2001-10-101-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91398 13f79535-47bb-0310-9956-ffa450edef68
* Rewrite of rotatelogs as an apr-ized app.William A. Rowe Jr2001-10-101-48/+66
| | | | | | | Mladen Turk <mturk@mappingsoft.com>, William Rowe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91397 13f79535-47bb-0310-9956-ffa450edef68
* include string.h for the strstr() prototypeJeff Trawick2001-03-141-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88514 13f79535-47bb-0310-9956-ffa450edef68
* Enhance customisability of rotatelogs: strftime(3)Ken Coar2001-03-131-5/+21
| | | | | | | | | formatting of filename and offset from UTC. Reviewed by: Greg Stein, David Reid, OtherBill git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88511 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright to 2001Roy T. Fielding2001-02-161-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88184 13f79535-47bb-0310-9956-ffa450edef68
* All the supports now build on APR (+APRUTIL), no reliance on httpd.William A. Rowe Jr2000-12-211-5/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87501 13f79535-47bb-0310-9956-ffa450edef68
* *) Accomodate an out-of-space condition in the piped logs and theWilliam A. Rowe Jr2000-11-211-11/+49
| | | | | | | | rotatelogs.c code, and no longer churn log processes for this condition. [Victor J. Orlikowski] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87049 13f79535-47bb-0310-9956-ffa450edef68
* Just style nits before someone goes and does something significant.William A. Rowe Jr2000-11-171-44/+44
| | | | | | | | Submitted by: Victor J. Orlikowski [v.j.orlikowski@gte.net] Reviewed by: William Rowe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86996 13f79535-47bb-0310-9956-ffa450edef68
* Protect system header files with the appropriate macros.Ryan Bloom2000-06-131-3/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85558 13f79535-47bb-0310-9956-ffa450edef68
* Clean up a big chunk of ap_config.h. This basically stops ap_config.h fromRyan Bloom2000-06-121-0/+1
| | | | | | | | | | | | | including any files. Because of this change, other files must include their own headers. I also cleaned up a couple of other bugs in some modules because I had to compile them all. I expect this to break multiple platforms, but this will be fixed over time. The massive configure cleanup is almost done. I will go through the files one more time after this commit. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85553 13f79535-47bb-0310-9956-ffa450edef68
* William A. Rowe Jr2000-05-201-6/+8
| | | | | | | | Why should Ryan have all the fun? Cleans up compiler warning emits. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85263 13f79535-47bb-0310-9956-ffa450edef68
* Make reliable piped logs work on 2.0.Ryan Bloom2000-05-041-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85136 13f79535-47bb-0310-9956-ffa450edef68
* Fix some compile breaks in the support directory. These have not beenRyan Bloom2000-04-271-1/+2
| | | | | | | tested, but they do compile at least. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85054 13f79535-47bb-0310-9956-ffa450edef68
* Update to Apache Software License version 1.1Roy T. Fielding2000-03-311-0/+54
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84881 13f79535-47bb-0310-9956-ffa450edef68
* Fix FreeBSD build break caused by my last commit to the file. Doh!Bill Stoddard2000-02-171-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84636 13f79535-47bb-0310-9956-ffa450edef68
* Add rotatelogs to the Windows portBill Stoddard2000-02-161-1/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84632 13f79535-47bb-0310-9956-ffa450edef68
* Apache 1.3.9 baseline for the Apache 2.0 repository.Roy T. Fielding1999-08-241-0/+82
Obtained from: Apache 1.3.9 (minus unused files), tag APACHE_1_3_9 Submitted by: Apache Group git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83750 13f79535-47bb-0310-9956-ffa450edef68