@@ -42,6 +42,7 @@ static const char *redirectionio_set_enable(cmd_parms *cmd, void *cfg, const cha
4242static const char * redirectionio_set_project_key (cmd_parms * cmd , void * cfg , const char * arg );
4343static const char * redirectionio_set_logs_enable (cmd_parms * cmd , void * cfg , const char * arg );
4444static const char * redirectionio_set_pass (cmd_parms * cmd , void * cfg , const char * arg );
45+ static void redirectionio_apache_log_callback (const char * log_str , const void * data );
4546
4647static const command_rec redirectionio_directives [] = {
4748 AP_INIT_TAKE1 ("redirectionio" , redirectionio_set_enable , NULL , OR_ALL , "Enable or disable redirectionio" ),
@@ -138,6 +139,9 @@ static int redirectionio_match_handler(request_rec *r) {
138139 return DECLINED ;
139140 }
140141
142+ // Init logging
143+ redirectionio_init_log_callback (redirectionio_apache_log_callback , r );
144+
141145 // Ask for redirection
142146 if (redirectionio_protocol_match (conn , ctx , r , config -> project_key ) != APR_SUCCESS ) {
143147 redirectionio_invalidate_connection (conn , config , r -> pool );
@@ -716,3 +720,7 @@ static const char *redirectionio_set_pass(cmd_parms *cmd, void *cfg, const char
716720
717721 return NULL ;
718722}
723+
724+ static void redirectionio_apache_log_callback (const char * log_str , const void * data ) {
725+ ap_log_rerror (APLOG_MARK , APLOG_ERR , 0 , (request_rec * )data , "mod_redirectionio api error: %s" , log_str );
726+ }
0 commit comments