6

I am trying to stop the debugging spew of the Android beacon library, but it does not work.

I have this in my gradle:

compile 'org.altbeacon:android-beacon-library:2.3.3'

I tried:

public BeaconManager(Context ctx, org.altbeacon.beacon.BeaconManager beaconManager) {
    mContext = ctx;
    this.beaconManager = beaconManager;


    // this is saying deprecated
    this.beaconManager.setDebug(false);

    // I also tried this and the same thing
    org.altbeacon.beacon.logging.LogManager.setVerboseLoggingEnabled(false);

But no matter what, i keep getting these logs. And they get on the way to debug other things.

02-18 16:21:29.784 31809-31818/com.myapp D/ScanRecord: first manudata for manu ID
02-18 16:21:29.784 31809-31818/com.myapp D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=45:0A:1B:49:64:7F, mScanRecord=ScanRecord [mAdvertiseFlags=6, mServiceUuids=[f41ef1ee-fde5-23be-5f4b-589c71babfdd], mManufacturerSpecificData={76=[2, 21, 97, 104, 113, 9, -112, 95, 68, 54, -111, -8, -26, 2, -11, 20, -55, 109, 0, 3, 17, -71, -89]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=BC Beacon�], mRssi=-106, mTimestampNanos=284946077119796}

any clues?

AVI
  • 5,516
  • 5
  • 29
  • 38
gmmo
  • 2,577
  • 3
  • 30
  • 56

1 Answers1

18

Create your own Log Tag filter with the following regex:

^(?!.*(ScanRecord)).*$

It will remove all lines with "ScanRecord" in it, you can add more by doing (ScanRecord|BluetoothLeScanner) if needed

  • I can never remember this regex, and it's so useful- merci! – Saik Caskey Mar 28 '17 at 13:55
  • Thanks it works but I am still confused as to why the OS displays so much info and so fast. Do you know if there is any way to turn off beacon logging? – Saik Nov 27 '17 at 04:48