Hi all,
I've implemented a Perl module with a function to copy to another location and compress domain logs. I've registered it with manage_hooks successfully. This is what it looks like:
[/usr/local/apache/domlogs]# /usr/local/cpanel/bin/manage_hooks list
Stats:
RunUser:
stage: pre
weight: 1000
exectype: module
hook: Capside::Rotatelogs::rotate
As I understand [1], this should run right before cpanellogd comes in to process a user's log. However, if I manually run a user's statistics through WHM, nothing happens. I've put some lines in the function to print messages to STDERR as it goes, but nothing appears in /usr/local/cpanel/error_log, where I've read it should go and where messages from cpanellogd go, so I think the hook is never executed (I'm guessing that if the 'hook manager' had any trouble running the module it would appear here too).
Any idea on what I'm missing? Is there something else I need to do for the hook to execute the function? Or is it that it won't work when run manually from WHM?
Thanks!
[1] Stats Functions | Standardized Hooks


LinkBack URL
About LinkBacks
Reply With Quote