Project

General

Profile

Bug #1211

Amahi specific logging

Added by cpg about 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Target version:
-
Start date:
12/14/2013
Due date:
% Done:

0%


Description

One thing I would like to do is logging for debugging puposes, however, I would like to disable logging for the external releases.

I would like to do this as part of the release checklist and prior to distribution to others. The idea is that we do not leak information like urls, session tokens, etc. to users who may get the apk, either for testing or for more nefarious purposes.

To do this best is to do it in one place. I iOS we used a single function/method that we defined to use the standard OS logging via whatever system logging mechanism exists.

Can we do something like that here?

History

#1 Updated by Anonymous about 8 years ago

We use Android's built in logging facility logcat. The information on this page may help us strip logcat calls from release packages.
http://stackoverflow.com/questions/5141751/is-there-an-easy-way-to-deactivate-logging-prior-to-releasing-your-app-on-the

#2 Updated by cpg over 7 years ago

  • Status changed from New to Assigned
  • Assignee set to ming
  • Priority changed from Normal to Low

#3 Updated by ming over 7 years ago

Disabling logging for releases is of course possible. What kind of logs do you wish to have? HTTP headers or something else?

#4 Updated by cpg over 7 years ago

Let me give an example. I changed my proxy to be my local server and it probably will not work, however, I would like to easily turn something on, recompile and see the interactions with the api, proxy and the relay in the logcat.

Basically we:

  • want to turn it on by a compilation flag (e.g. a constant definition, in C/C++ terms, a #define)
  • we want to make sure it cannot be turned at run time, so for production/release, we want to turn this setting off and be sure it cannot be turned on

In the future we may want to also see other things other than what the api/pfe/relay APIs return.

#5 Updated by ming over 7 years ago

  • Status changed from Assigned to Closed

#6 Updated by cpg over 7 years ago

  • Status changed from Closed to Assigned

can you add a note in the README (or in a docs/DEBUGGING.md file or somesuch), on how to turn on debugging and use it?
it should be in a way a dummy like me could manage to turn logging on and add statements to log.

(note that this is low priority and should not take over higher priority items)

#7 Updated by ming over 7 years ago

Nothing manual is required, logs will be enabled when building the debug version and will be disabled when building the release version which we haven’t set it up yet, because it requires generated keys and so on.

#8 Updated by ming over 7 years ago

  • Status changed from Assigned to Closed

Also available in: Atom