Git Product home page Git Product logo

android-logging-log4j's People

Contributors

motocoder avatar roku-zz avatar

Watchers

 avatar

android-logging-log4j's Issues

Allow TagLayout to be set

I am using version 1.0.3.

I'd like to be able to set the layout of the TAG. Generally, I'd like to narraw 
it down to the simple class name:

tagLayout = "%c{1}"

The LogConfigurator should have a public setter and hand the layout over to the 
appender: 

public void setTagLayout(final String tagLayout) {
   this.tagLayout = tagLayout;
}

Original issue reported on code.google.com by [email protected] on 5 Nov 2012 at 3:25

maxfileSize > 1MB ignored

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 [email protected] on 9 Feb 2015 at 12:38

log4j crashes when sd-card is shared with computer

What steps will reproduce the problem?
1. share sd-card with your computer
2. android-log4j crashes

Log4J will crash, when I share the sd-card from my phone with my computer, 
because Log4J has no access to the sd-card (makes sense ;-) ). Is there a 
workaround for that? For example log output could be buffered while the sd-card 
is mounted to the pc or something else...

Original issue reported on code.google.com by [email protected] on 29 Mar 2013 at 1:31

Does not working using ProGuard?

What steps will reproduce the problem?

1. Create an Android application using the log4j logging as you described in 
the documentation in the Using log4j directly section.
2. Run the application on the phone in debug mode and the logging is working.
3. Export the Android application using Proguard and it gives unresolvable 
warnings about the log4j classes (I presume that's because they are simple Java 
classes and not "Android Java" classes).

Any suggestions?

Thanks.
Daniel

Original issue reported on code.google.com by [email protected] on 19 Jan 2013 at 1:42

Trying to implement the logger gives a FileNotFoundException

What steps will reproduce the problem?
1. Follow the instructions provided on the site and import all the jars for 
log4j and slf4j
2. Create the logConfigurator as shown in the example
3. Write a log info for an example
4. Add to the manifest the permisions android.permission.WRITE_EXTERNAL_STORAGE

What is the expected output? What do you see instead?
I get the following eror
E/AndroidRuntime(408): Caused by: java.io.FileNotFoundException: 
/sdcard/speedy.log

What version of the product are you using? On what operating system?
I am using version 1.0.2 of the product in the windows xp, eclipse environment


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 14 May 2012 at 11:21

1.0.3 seems to need 1.2.6 minimum, not any 1.2

What steps will reproduce the problem?
1.Setup new android application with android logging 1.0.3
2.Add any log4j 1.2 previous to 1.2.6
3.try logging.

What is the expected output? What do you see instead?
crashes android application

What version of the product are you using? On what operating system?
1.0.3 on android 2.3 application

Please provide any additional information below.

android java.lang.NoSuchMethodError: org.apache.log4j.spi.LoggingEvent.getLevel

Threre is a more than 100kb diference betwin 1.2.2 and 1.2.6

Original issue reported on code.google.com by [email protected] on 11 May 2013 at 11:34

Erro start emulator

[2012-04-23 10:28:38 - XXX] Dx warning: Ignoring InnerClasses attribute for an 
anonymous inner class
(org.apache.log4j.xml.DOMConfigurator$5) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
[2012-04-23 10:28:39 - XXX] ------------------------------
[2012-04-23 10:28:39 - XXX] Android Launch!
[2012-04-23 10:28:39 - XXX] adb is running normally.

Original issue reported on code.google.com by [email protected] on 23 Apr 2012 at 1:49

Multiple lines,

What steps will reproduce the problem?

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ViewsActivity {
    private final Logger log =  LoggerFactory.getLogger(ViewsActivity.class);

@Override
public void onCreate(Bundle pSavedInstanceState) {
    ConfigureLog4j.configure();
    log.info("info");
    log.debug("debug");
    log.error("error");
}


package com.niffy.views.misc;

import org.apache.log4j.Level;
import org.apache.log4j.Logger;

import android.os.Environment;
import de.mindpipe.android.logging.log4j.LogConfigurator;
public class ConfigureLog4j {
    private final static LogConfigurator mLogConfigurator = new LogConfigurator();
    public ConfigureLog4j(){

    }

    public static void configure() {
        mLogConfigurator.setFileName(Environment.getExternalStorageDirectory() + "/myapp.log");
        mLogConfigurator.setUseLogCatAppender(true);
        mLogConfigurator.setFilePattern("%d - [%p::%c::%C] - %m%n");
        mLogConfigurator.setLogCatPattern("%m%n");
        mLogConfigurator.configure();
    }

}

What is the expected output? What do you see instead?
I expect Info, Debug, Error messages.
I get them multiple times (3 in all)

What version of the product are you using? On what operating system?
android-logging-log4j-1.0.2.jar
log4j-1.2.17
slf4j-api-1.6.6
slf4j-log4j12-1.6.6
Android 2.2.2

Please provide any additional information below.

I cannot see what I am doing what and why the hell Its outputting 3 times.  
What am I doing wrong. Quite frankly the information available regarding 
logging for android is woeful. 

Original issue reported on code.google.com by [email protected] on 22 Jun 2012 at 7:57

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.