JakeWharton / hugo

Annotation-triggered method call logging for your debug builds.
Apache License 2.0
7.92k stars 797 forks source link

DebugLog does not work in library module #80

Closed curilpe closed 9 years ago

curilpe commented 9 years ago

Project with multi-module setup (application + library) does not log methods annotated with @DebugLog from library module. In application module it works fine.

here is example https://github.com/curilpe/hugo-test

EDIT:

problem is not in hugo but in android gradle plugin because all library modules are release builds regardless of build type of application.

to change it to debug build just put in build file of library module

android { defaultPublishConfig "debug" }

promeG commented 9 years ago

@curilpe Maybe you should take a look at XLog.

This library have the same funcation as Hugo, and it support library project.

curilpe commented 9 years ago

XLog requires root access so it can not be used on real projects.

promeG commented 9 years ago

@curilpe

A project with XLog can run on any devices with or without Xposed(or rooted).

But you have to root and install Xposed & XLog module to see the method log.

Without xposed (or rooted), XLog just doing noting at all. So XLog will not log any thing and cause any problems in a release version on the final user's device.

sperzion commented 8 years ago

@curilpe Were you able to get Hugo to work in your library project when you had it build in debug mode? I tried recently, but was unable to see any Hugo output in my debug library build.

MessuKilkain commented 8 years ago

I was able to use hugo in only a specific module by using the following code in the build.gradle file of my module :

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
    }
}

apply plugin: 'com.jakewharton.hugo'

android {
    [...]
    buildTypes {
        [...]
        debug {
            defaultPublishConfig "debug"
        }
    }
}
challchampion commented 7 years ago

@MessuKilkain In this way, everytime it outputs debug.aar, how can we configure it outputs release.aar when the whole project buildType is release?

johnsonyuw commented 7 years ago

@curilpe do you find method to fix this problem