mirror of
https://github.com/gradle/actions.git
synced 2025-04-20 09:49:19 +08:00
Improvements to debug logging
- Enable cache debugging when ACTIONS_STEP_DEBUG is on - Replace some info messages with debug
This commit is contained in:
parent
f4f7af32dc
commit
9eb8242410
@ -215,7 +215,7 @@ env:
|
|||||||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that this setting will also prevent certain cache operations from running in parallel, further assisting with debugging.
|
Note that when the workflow is run in debug mode (above), cache debugging is automatically enabled.
|
||||||
|
|
||||||
## How Gradle User Home caching works
|
## How Gradle User Home caching works
|
||||||
|
|
||||||
|
@ -247,6 +247,8 @@ export class GradleStateCache {
|
|||||||
/**
|
/**
|
||||||
* When the GitHub environment ACTIONS_RUNNER_DEBUG is true, run Gradle with --info and --stacktrace.
|
* When the GitHub environment ACTIONS_RUNNER_DEBUG is true, run Gradle with --info and --stacktrace.
|
||||||
* see https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging
|
* see https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging
|
||||||
|
*
|
||||||
|
* @VisibleForTesting
|
||||||
*/
|
*/
|
||||||
configureInfoLogLevel(): void {
|
configureInfoLogLevel(): void {
|
||||||
const infoProperties = `org.gradle.logging.level=info\norg.gradle.logging.stacktrace=all\n`
|
const infoProperties = `org.gradle.logging.level=info\norg.gradle.logging.stacktrace=all\n`
|
||||||
@ -262,11 +264,11 @@ export class GradleStateCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When cache debugging is enabled, this method will give a detailed report
|
* When cache debugging is enabled (or ACTIONS_STEP_DEBUG is on),
|
||||||
* of the Gradle User Home contents.
|
* this method will give a detailed report of the Gradle User Home contents.
|
||||||
*/
|
*/
|
||||||
private async debugReportGradleUserHomeSize(label: string): Promise<void> {
|
private async debugReportGradleUserHomeSize(label: string): Promise<void> {
|
||||||
if (!isCacheDebuggingEnabled()) {
|
if (!isCacheDebuggingEnabled() && !core.isDebug()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!fs.existsSync(this.gradleUserHome)) {
|
if (!fs.existsSync(this.gradleUserHome)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user