diff --git a/lib/modules/Search.pmod/Utils.pmod b/lib/modules/Search.pmod/Utils.pmod
index b5412407c0b44465d2119b77506e76d619b973fc..62ca6a5d4bf112e5166fd8eb76bb289e4a1d5dbf 100644
--- a/lib/modules/Search.pmod/Utils.pmod
+++ b/lib/modules/Search.pmod/Utils.pmod
@@ -672,7 +672,7 @@ class Logger {
   private int last_log_purge_time;
   private constant log_purge_freq = 8*60*60; // Purge log every 8 h or so.
 
-  private string indentation = "                    ";
+  private string indentation = " " * 20;
 
   private Sql.Sql get_db() {
     Sql.Sql db;
@@ -689,14 +689,18 @@ class Logger {
     return db;
   }
 
+  //  Detection constant for code that instantiate this class to avoid
+  //  compilation errors.
+  constant supports_flexible_indentation = 1;
+
   //! @decl void create(Sql.Sql db_object, int profile, int stderr_logging)
   //! @decl void create(string db_url, int profile, int stderr_logging)
-  void create(string|Sql.Sql _logdb, int _profile, int _stderr_logging, void|int indentation_width) {
+  void create(string|Sql.Sql _logdb, int _profile, int _stderr_logging, void|int(0..) indentation_width) {
     logdb = _logdb;
     profile = _profile;
     stderr_logging = _stderr_logging;
     if (!zero_type(indentation_width)) {
-      indentation = sprintf("%"+indentation_width+"n");
+      indentation = (" " * indentation_width);
     }
 
     // create table eventlog (event int unsigned auto_increment primary key,