]> source.dussan.org Git - rspamd.git/commitdiff
Improve logging of hyperscan cache
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 10 Dec 2015 18:31:12 +0000 (18:31 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 10 Dec 2015 18:31:12 +0000 (18:31 +0000)
src/libserver/re_cache.c

index b46a5bba989aa27c6251700cfeb3a263dcbaa8a5..95d64edf94b2941270e9eb4585d6a758b7209215 100644 (file)
@@ -1024,8 +1024,6 @@ rspamd_re_cache_compile_hyperscan (struct rspamd_re_cache *cache,
                                G_DIR_SEPARATOR, re_class->hash);
 
                if (rspamd_re_cache_is_valid_hyperscan_file (cache, path, TRUE)) {
-                       msg_info_re_cache ("skip already valid file for re class '%s'",
-                                       re_class->hash);
 
                        fd = open (path, O_RDONLY, 00600);
 
@@ -1036,6 +1034,14 @@ rspamd_re_cache_compile_hyperscan (struct rspamd_re_cache *cache,
                        total += n;
                        close (fd);
 
+                       msg_info_re_cache (
+                                       "skip already valid class %s(%*s) to cache %6s, %d regexps",
+                                       rspamd_re_cache_type_to_string (re_class->type),
+                                       (gint) re_class->type_len,
+                                       re_class->type_data,
+                                       re_class->hash,
+                                       n);
+
                        continue;
                }
 
@@ -1195,7 +1201,7 @@ rspamd_re_cache_compile_hyperscan (struct rspamd_re_cache *cache,
                                return -1;
                        }
 
-                       msg_info_re_cache ("compiled class %s(%*s) to cache %s, %d regexps",
+                       msg_info_re_cache ("compiled class %s(%*s) to cache %6s, %d regexps",
                                        rspamd_re_cache_type_to_string (re_class->type),
                                        (gint)re_class->type_len,
                                        re_class->type_data,