Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.
This object is in archive! 

Allow server administrators to specify a custom piped log processor instead of splitlogs, similar to the existing ability to use a custom dnsadmin

tomin shared this idea 12 years ago
Open Discussion

It's already possible to use an alternative dnsadmin application, I'd like to also be able to specify an alternative application instead of /usr/local/cpanel/bin/splitlogs when using Apache Piped Logs. Currently there's no way to do this short of either:


1) Renaming /usr/local/cpanel/bin/splitlogs and placing the alternative there instead

2) Editing /usr/local/cpanel/Cpanel/AdvConfig/apache.pm to alter the hardcoded /usr/local/cpanel/bin/splitlogs paths to the alternative


Neither option is really feasible for production use as both are likely to be undone by a cPanel update, and putting the changes back in place via postupcp or similar is awfully dirty at best.


The current splitlogs implementation already supports a config file (/var/cpanel/conf/splitlogs.conf) for the maxopen/buffer settings - it seems entirely feasible for it to also allow specifying an alternative to /usr/local/cpanel/bin/splitlogs.


To that end I've written a small and easily-reviewed patch (attached) for Cpanel/AdvConfig/apache.pm that adds support for a new splitlogs.conf setting named 'app'. That setting specifies which executable to run, and defaults to '/usr/local/cpanel/bin/splitlogs' so the existing behaviour is unchanged. I don't believe any UI updates are necessary (at least, I can't find any existing UI to adjust the existing maxopen/buffer settings in 11.34.0.9)


All feedback appreciated, thanks for reading!

Leave a Comment
 
Attach a file