Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: How to change the default logging level?

According to the documentation there are only two ways to change the default logging level from INFO to lower levels (such as DEBUG):

  1. setprop log.tag.<YOUR_LOG_TAG> <LEVEL>, or
  2. log.tag.<YOUR_LOG_TAG>=<LEVEL> in /data/local.prop.

Is it possible to bundle the logging configuration within the application? I'm looking for the equivalent of logging.properties or logback.xml, configuration files that are bundled with the application and alter the logging behavior at load-time. The goal is to avoid manually configuring each device that the application will run on.

like image 673
Gili Avatar asked Oct 30 '12 05:10

Gili


1 Answers

I ended up using logback-android. I will leave this question open a bit longer in case someone comes up with a better solution.

like image 63
Gili Avatar answered Oct 09 '22 00:10

Gili