[GH-ISSUE #2058] Suppress debug output #989

Open
opened 2026-03-01 21:47:59 +03:00 by kerem · 5 comments
Owner

Originally created by @johnjeffers on GitHub (Oct 20, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/2058

Act version

act version 0.2.52

Feature description

I would appreciate a flag to suppress ::debug:: log output.

The debug log lines repeat info I'm already getting from stdout (but without newlines, so... harder to read). Ideally, debug would not echo the info I'm already seeing from stdout, but if that's not possible, it would be great to be able to just turn it off entirely unless I'm actually debugging the workflow.

I saw this discussion asking for a feature request, so here is that feature request. Thank you!

Originally created by @johnjeffers on GitHub (Oct 20, 2023). Original GitHub issue: https://github.com/nektos/act/issues/2058 ### Act version act version 0.2.52 ### Feature description I would appreciate a flag to suppress `::debug::` log output. The debug log lines repeat info I'm already getting from `stdout` (but without newlines, so... harder to read). Ideally, `debug` would not echo the info I'm already seeing from `stdout`, but if that's not possible, it would be great to be able to just turn it off entirely unless I'm actually debugging the workflow. I saw [this discussion](https://github.com/nektos/act/discussions/1441) asking for a feature request, so here is that feature request. Thank you!
Author
Owner

@Tomasz-Marciniak commented on GitHub (Apr 30, 2024):

I know this is workaround but you can use this approach:

act | grep -v '::'

<!-- gh-comment-id:2085618846 --> @Tomasz-Marciniak commented on GitHub (Apr 30, 2024): I know this is workaround but you can use this approach: `act | grep -v '::'`
Author
Owner

@jlenuffgsoi commented on GitHub (Jul 12, 2024):

I know this is workaround but you can use this approach:

act | grep -v '::'

Sure, this works, but we loose color output.

A --log-level would be great.

<!-- gh-comment-id:2224862804 --> @jlenuffgsoi commented on GitHub (Jul 12, 2024): > I know this is workaround but you can use this approach: > > `act | grep -v '::'` Sure, this works, but we loose color output. A `--log-level` would be great.
Author
Owner

@sebthom commented on GitHub (Sep 6, 2024):

  1. Would be nice to control this via .actrc
  2. I would not want to suppress all :: messages like ::set-output:: or ::set-env:: but only ::debug which seem to have less value for regular users. E.g. the following is just noise for an end-user
    [Build/maven-build]     ::debug::Resolved Keys:
    [Build/maven-build]     ::debug::["Linux-X64-mvn-repo-a404baf74e8e894bf7febe9f388fd6e2b390746c0cd1c22fa99743bf7e5ce10c","Linux-X64-mvn-repo-"]
    [Build/maven-build]     ::debug::Checking zstd --quiet --version
    [Build/maven-build]     ::debug::1.4.8
    [Build/maven-build]     ::debug::zstd version: 1.4.8
    [Build/maven-build]     ::debug::Resource Url: http://192.168.140.68:60061/_apis/artifactcache/cache?keys=Linux-X64-mvn-repo-a404baf74e8e894bf7febe9f388fd6e2b390746c0cd1c22fa99743bf7e5ce10c%252CLinux-X64-mvn-repo-&version=943ca712 f8a406a5a1a06074efd3ccc4143c2fc61a0a6e569dd5a176287bcc05
    [Build/maven-build]     ::debug::Cache Result:
    [Build/maven-build]     ::debug::{"archiveLocation":"***","cacheKey":"linux-x64-mvn-repo-a404baf74e8e894bf7febe9f388fd6e2b390746c0cd1c22fa99743bf7e5ce10c","result":"hit"}
    [Build/maven-build]     ::debug::Archive Path: /tmp/114ff25b-282c-48f0-9a60-3c960c19d967/cache.tzst
    [Build/maven-build]     ::debug::Use Azure SDK: false
    [Build/maven-build]     ::debug::Download concurrency: 8
    [Build/maven-build]     ::debug::Request timeout (ms): 30000
    [Build/maven-build]     ::debug::Cache segment download timeout mins env var: undefined
    [Build/maven-build]     ::debug::Segment download timeout (ms): 600000
    [Build/maven-build]     ::debug::Lookup only: false
    
  3. I am on windows where I tried to use act | findstr /V ::debug but this breaks ANSI coloring and emojis.
<!-- gh-comment-id:2333919029 --> @sebthom commented on GitHub (Sep 6, 2024): 1. Would be nice to control this via `.actrc` 1. I would not want to suppress all `::` messages like `::set-output::` or `::set-env::` but only `::debug` which seem to have less value for regular users. E.g. the following is just noise for an end-user ```py [Build/maven-build] � ::debug::Resolved Keys: [Build/maven-build] � ::debug::["Linux-X64-mvn-repo-a404baf74e8e894bf7febe9f388fd6e2b390746c0cd1c22fa99743bf7e5ce10c","Linux-X64-mvn-repo-"] [Build/maven-build] � ::debug::Checking zstd --quiet --version [Build/maven-build] � ::debug::1.4.8 [Build/maven-build] � ::debug::zstd version: 1.4.8 [Build/maven-build] � ::debug::Resource Url: http://192.168.140.68:60061/_apis/artifactcache/cache?keys=Linux-X64-mvn-repo-a404baf74e8e894bf7febe9f388fd6e2b390746c0cd1c22fa99743bf7e5ce10c%252CLinux-X64-mvn-repo-&version=943ca712 f8a406a5a1a06074efd3ccc4143c2fc61a0a6e569dd5a176287bcc05 [Build/maven-build] � ::debug::Cache Result: [Build/maven-build] � ::debug::{"archiveLocation":"***","cacheKey":"linux-x64-mvn-repo-a404baf74e8e894bf7febe9f388fd6e2b390746c0cd1c22fa99743bf7e5ce10c","result":"hit"} [Build/maven-build] � ::debug::Archive Path: /tmp/114ff25b-282c-48f0-9a60-3c960c19d967/cache.tzst [Build/maven-build] � ::debug::Use Azure SDK: false [Build/maven-build] � ::debug::Download concurrency: 8 [Build/maven-build] � ::debug::Request timeout (ms): 30000 [Build/maven-build] � ::debug::Cache segment download timeout mins env var: undefined [Build/maven-build] � ::debug::Segment download timeout (ms): 600000 [Build/maven-build] � ::debug::Lookup only: false ``` 1. I am on windows where I tried to use `act | findstr /V ::debug` but this breaks ANSI coloring and emojis.
Author
Owner

@aliozinan commented on GitHub (Sep 17, 2024):

I know this is workaround but you can use this approach:

act | grep -v '::'

Sure, this works, but we loose color output.

A --log-level would be great.

this will keep the color in the output :

grep --color=always -v '::'

<!-- gh-comment-id:2354828454 --> @aliozinan commented on GitHub (Sep 17, 2024): > > I know this is workaround but you can use this approach: > > > > `act | grep -v '::'` > > Sure, this works, but we loose color output. > > A `--log-level` would be great. this will keep the color in the output : `grep --color=always -v '::'`
Author
Owner

@isuda commented on GitHub (Sep 27, 2024):

Try CLICOLOR_FORCE=1

github.com/nektos/act@6657fcae3d/pkg/runner/logger.go (L248)

<!-- gh-comment-id:2379869125 --> @isuda commented on GitHub (Sep 27, 2024): Try CLICOLOR_FORCE=1 https://github.com/nektos/act/blob/6657fcae3d2f116b57f54402e3601702d37c3f57/pkg/runner/logger.go#L248
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#989
No description provided.