code: public void log(CmsDbContext dbc, CmsLogEntry logEntry, boolean force) {
  
          if (dbc == null) {
              return;
          }
          // check log level
          if (!logEntry.getType().isActive()) {
              // do not log inactive entries
              return;
          }
          // if not forcing
          if (!force) {
              // operation already logged
              boolean abort = (dbc.getAttribute(CmsLogEntry.ATTR_LOG_ENTRY) != null);
              // disabled logging from outside
              abort |= (dbc.getRequestContext().getAttribute(CmsLogEntry.ATTR_LOG_ENTRY) != null);
              if (abort) {
                  return;
              }
          }
          // prevent several entries for the same operation
          dbc.setAttribute(CmsLogEntry.ATTR_LOG_ENTRY, Boolean.TRUE);
          // keep it for later
          m_log.add(logEntry);
      }
docs: Adds the given log entry to the current user's log.<p>
  
  This operation works only on memory, to get the log entries actually
  written to DB you have to call the {@link #updateLog(CmsDbContext)} method.<p>
  
  @param dbc the current database context
  @param logEntry the log entry to create
  @param force forces the log entry to be counted,
  if not only the first log entry in a transaction will be taken into account