You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2009/02/06 23:11:38 UTC

DO NOT REPLY [Bug 46669] New: rotatelogs doesn't autocreate directories

https://issues.apache.org/bugzilla/show_bug.cgi?id=46669

           Summary: rotatelogs doesn't autocreate directories
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: lance@osuosl.org


I'm attempting to switch all our chronological logging from cronolog to
rotatelogs. We use directories for each vhost's logs under /var/log/apache and
cronolog would automatically create directories for logs if they weren't
already there.

Could you please add support for rotatelogs to automatically create directories
if it doesn't exist? 

Example of what we have:

CustomLog "|/usr/sbin/rotatelogs -l
/var/log/apache2/fooproject.org/transfer/%Y%m%d.log 86400" combined

Instead I got something like this in the errorlog:

Could not open log file '/var/log/apache2/fooproject.org/transfer/20090206.log'
(No such file or directory)
piped log program '/usr/sbin/rotatelogs -l
/var/log/apache2/fooproject.org/transfer/%Y%m%d.log 86400' failed unexpectedly

I'd submit a patch but I'm not strong in C coding :)

Thanks!


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 46669] rotatelogs doesn't autocreate directories

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46669

--- Comment #1 from Philippe Lantin <pl...@cobaltgroup.com> ---
Created attachment 29673
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29673&action=edit
Patch against 2.2.23 to support creating directories with -d option

Create dir procedure copied from Apache licensed cronolog project.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 46669] rotatelogs doesn't autocreate directories

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46669

--- Comment #9 from Ben Reser <be...@reser.org> ---
Since the patch was originally written another usage of -p has been added to
trunk that is completely different.  So a different option name will have to be
used.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 46669] rotatelogs doesn't autocreate directories

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46669

--- Comment #5 from Eric Covener <co...@gmail.com> ---
Based on Ben's comments, I don't think we can accept this without some kind of
CCLA (corporate contributors license agreement) or grant.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 46669] rotatelogs doesn't autocreate directories

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46669

--- Comment #3 from Ben Reser <be...@reser.org> ---
Philippe,

That patch won't be accepted by Apache since you're not using APR and doing it
in a portable way.  There is a patch that would be accepted in a portable way
in your p4 repo that I wrote (when I worked at the same place you are) but was
never able to get permission to release.  I'd suggest you find that and get
permission to contribute it and use it instead.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 46669] rotatelogs doesn't autocreate directories

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46669

--- Comment #7 from Ben Reser <be...@reser.org> ---
Side note: There's another version of the patch that I believe was against the
current trunk at the time I wrote it.  Trying to get Philippe to find that as
well.

The 2.2.x patch won't apply cleanly to trunk due to some refactoring that's
been done since.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 46669] rotatelogs doesn't autocreate directories

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46669

Philippe Lantin <pl...@cobaltgroup.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29673|0                           |1
        is obsolete|                            |

--- Comment #4 from Philippe Lantin <pl...@cobaltgroup.com> ---
Created attachment 29690
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29690&action=edit
Ben's rotatelogs patch, more complete, APR compatible.

This patch introduces a "-p" option to create directories if necessary.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 46669] rotatelogs doesn't autocreate directories

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46669

--- Comment #8 from Ben Reser <be...@reser.org> ---
It is my understanding that secretary@apache.org now has a CCLA from ADP.  My
employer at the time I wrote the patch Philippe has attached and Philippe's
current employer.  Between that CCLA and my ICLA I believe we are covered now.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 46669] rotatelogs doesn't autocreate directories

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46669

Christophe JAILLET <ch...@wanadoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29690|0                           |1
           is patch|                            |
  Attachment #29690|application/octet-stream    |text/plain
          mime type|                            |

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 46669] rotatelogs doesn't autocreate directories

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46669

--- Comment #6 from Ben Reser <be...@reser.org> ---
Figured we'd need to get a CCLA.  Another option might be for them to give me
the copyright (exclude it from my work for hire agreement) and I can contribute
it under my ICLA.  I was trying to get that worked out but unfortunately, left
before we were able to complete it.  Given that Philippe is now involved
hopefully and there's another interested party there I think we can get that
figured out.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 46669] rotatelogs doesn't autocreate directories

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46669

Ben Reser <be...@reser.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |FixedInTrunk

--- Comment #10 from Ben Reser <be...@reser.org> ---
Ported the patch to trunk and changed the option name to -d.  Committed in
r1533810.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46669] rotatelogs doesn't autocreate directories

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46669

Ben Reser <be...@reser.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ben@reser.org

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 46669] rotatelogs doesn't autocreate directories

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46669

Christophe JAILLET <ch...@wanadoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

--- Comment #2 from Christophe JAILLET <ch...@wanadoo.fr> ---
Thanks for the patch, I'll give a look at it.


First, I think that the location of #ifndef _WIN32 is strange.
On a Windows machine, I doubt it could compile because of { } mismatch.

I think that you intended to have conditional compilation around mkdir(dirname,
DIR_MODE) and mkdir(dirname).

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46669] rotatelogs doesn't autocreate directories

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46669


Dan Poirier <po...@pobox.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org