def _write_agent_log4j_properties(self, agent_dir):
    log4j_properties = os.path.join(agent_dir, 'conf', 'log4j.properties')
    with open(log4j_properties, 'w+') as f:
        f.write('log4j.rootLogger=INFO,R\n')
        f.write('log4j.logger.org.apache.http=OFF\n')
        f.write('log4j.logger.org.eclipse.jetty.util.log=WARN,R\n')
        f.write('log4j.appender.R=org.apache.log4j.RollingFileAppender\n')
        f.write('log4j.appender.R.maxFileSize=20MB\n')
        f.write('log4j.appender.R.maxBackupIndex=5\n')
        f.write('log4j.appender.R.layout=org.apache.log4j.PatternLayout\n')
        f.write('log4j.appender.R.layout.ConversionPattern=%5p [%t] %d{ISO8601} %m%n\n')
        f.write('log4j.appender.R.File=./log/agent.log\n')
        f.close()
def _write_agent_log4j_properties(self, agent_dir):
    log4j_properties = os.path.join(agent_dir, 'conf', 'log4j.properties')
    with open(log4j_properties, 'w+') as f:
        f.write('log4j.rootLogger=INFO,R\n')
        f.write('log4j.logger.org.apache.http=OFF\n')
        f.write('log4j.logger.org.eclipse.jetty.util.log=WARN,R\n')
        f.write('log4j.appender.R=org.apache.log4j.RollingFileAppender\n')
        f.write('log4j.appender.R.maxFileSize=20MB\n')
        f.write('log4j.appender.R.maxBackupIndex=5\n')
        f.write('log4j.appender.R.layout=org.apache.log4j.PatternLayout\n')
        f.write('log4j.appender.R.layout.ConversionPattern=%5p [%t] %d{ISO8601} %m%n\n')
        f.write('log4j.appender.R.File=./log/agent.log\n')
        f.close()