Reputation: 18308
My build.gradle would like to log messages, I tried:
signingConfigs {
debug {
...
}
release {
...
project.logger.info("I am releasing build!");
}
}
buildTypes {
debug {
...
}
release {
signingConfig signingConfigs.release
project.logger.info("I am releasing build too!");
}
}
I choose "release" from build variant. But when I run build, I can't find the log message from "Gradle Console" on the right-bottom of Android Studio. Why? (I am using Android Studio 3.0.1)
Upvotes: 2
Views: 5940
Reputation: 1413
You are logging with info
level. To show info
messages you have to run your tasks with --info
or lower flag.
To print your message without any additional flag you should use lifecycle
logging level eg project.logger.lifecycle('I am releasing build too!')
or just print to System.out println('I am releasing build too!')
You may read more about logging at gradle tasks here https://docs.gradle.org/current/userguide/logging.html
Upvotes: 3