code: private boolean shouldLog() {
      // The log site may have already been injected via "withInjectedLogSite()".
      if (logSite == null) {
        // From the point at which we call inferLogSite() we can skip 1 additional method (the
        // shouldLog() method itself) when looking up the stack to find the log() method.
        logSite = checkNotNull(Platform.getCallerFinder().findLogSite(LogContext.class, 1),
            "logger backend must not return a null LogSite");
      }
      LogSiteKey logSiteKey = null;
      if (logSite != LogSite.INVALID) {
        logSiteKey = logSite;
      }
      if (!postProcess(logSiteKey)) {
        return false;
      }
      // Right at the end of post processing add any tags injected by the platform. Alternately this
      // could be done in logImpl(), but it would have the same effect. This should be the last piece
      // of metadata added to a LogData instance (but users are not allowed to rely on that).
      Tags tags = Platform.getInjectedTags();
      if (!tags.isEmpty()) {
        addMetadata(Key.TAGS, tags);
      }
      return true;
    }
docs: Pre-processes log metadata and determines whether we should make the pending logging call.
  <p>
  Note that this call is made inside each of the individual log methods (rather than in
  {@code logImpl()}) because it is better to decide whether we are actually going to do the
  logging before we pay the price of creating a varargs array and doing things like auto-boxing
  of arguments.