docs: public boolean closeLog(int closemode) {
  
          if (log == null) {
              return true;
          }
  
          try {
              switch (closemode) {
  
                  case Database.CLOSEMODE_IMMEDIATELY :
                      log.shutdown();
                      break;
  
                  case Database.CLOSEMODE_NORMAL :
                      log.close(false);
                      break;
  
                  case Database.CLOSEMODE_COMPACT :
                  case Database.CLOSEMODE_SCRIPT :
                      log.close(true);
                      break;
              }
          } catch (Throwable e) {
              appLog.logContext(e, "error closing log");
              appLog.close();
  
              log = null;
  
              return false;
          }
  
          appLog.sendLine(SimpleLog.LOG_ERROR, "Database closed");
          appLog.close();
  
          log = null;
  
          return true;
      }