@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "RV_RETURN_VALUE_IGNORED_BAD_PRACTICE",
      justification = "Return value for file delete is not important here.")
  private void initLogWriter() throws org.apache.geode.admin.AdminException {
    loggingSession.createSession(this);

    final LogConfig logConfig = agentConfig.createLogConfig();

    // LOG: create logWriterAppender here
    loggingSession.startSession();

    // LOG: look in AgentConfigImpl for existing LogWriter to use
    InternalLogWriter existingLogWriter = agentConfig.getInternalLogWriter();
    if (existingLogWriter != null) {
      logWriter = existingLogWriter;
    } else {
      // LOG: create LogWriterLogger
      logWriter = LogWriterFactory.createLogWriterLogger(logConfig, false);
      // Set this log writer in AgentConfigImpl
      agentConfig.setInternalLogWriter(logWriter);
    }

    // LOG: create logWriter here
    logWriter = LogWriterFactory.createLogWriterLogger(logConfig, false);

    // Set this log writer in AgentConfig
    agentConfig.setInternalLogWriter(logWriter);

    // LOG:CONFIG: changed next three statements from config to info
    logger.info(LogMarker.CONFIG_MARKER,
        String.format("Agent config property file name: %s",
            AgentConfigImpl.retrievePropertyFile()));
    logger.info(LogMarker.CONFIG_MARKER, agentConfig.getPropertyFileDescription());
    logger.info(LogMarker.CONFIG_MARKER, agentConfig.toPropertiesAsString());
  }
Creates a LogWriterI18n for this Agent to use in logging.
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentImpl.java