about-bob / android-logging-log4j

Automatically exported from code.google.com/p/android-logging-log4j
0 stars 0 forks source link

maxfileSize > 1MB ignored #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Initialize Log4J with this snippet:

    static {
        configureLog4j();
    }

    private static void configureLog4j() {
        final File dir = new File(LOG_DIR);
        if(!dir.exists()) {
            dir.mkdir();
        }
        logger = Logger.getLogger(LOGGER_NAME);
        configure();
    }

    private static void configure( ) {
        logConfigurator.setFileName(FILE_NAME);
        logConfigurator.setMaxFileSize(MAX_FILE_SIZE);
        logConfigurator.setFilePattern(LOG_PATTERN);
        logConfigurator.setMaxBackupSize(MAX_BACKUP_FILE_COUNT);
        logConfigurator.setRootLevel(LOGGING_LEVEL);
        setLoggingLevels(LOGGING_LEVEL.toInt());
        logConfigurator.setUseLogCatAppender(true);
        logConfigurator.setUseFileAppender(true);
        logConfigurator.configure();
    }

where MAX_FILE_SIZE = 10 * 1024 * 1024

What is the expected output? What do you see instead?

Logging files with a size of up to 10 MB. Instead we observe 1 MB files.

What version of the product are you using? On what operating system?

1.0.2 with Android SDK level 19 on Android 4.3

Please provide any additional information below.

Original issue reported on code.google.com by cku...@gmail.com on 9 Feb 2015 at 12:38