ben3726 / android-logging-log4j Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/android-logging-log4j
Automatically exported from code.google.com/p/android-logging-log4j
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
[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
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
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
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
Is it possible, to log multiple applications into one log file (at the same
time)?
Thanks
Original issue reported on code.google.com by [email protected]
on 9 Oct 2012 at 6:35
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
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.