Skip to content

Conversation

@levibostian
Copy link
Owner

@levibostian levibostian commented Aug 16, 2025

Related GitHub Issues

Problem

Whenever you open a pull request and you view the test mode logs and you see a result that you did not expect, the the next thing you do is go into the CI and start looking at the logs. The problem is the debug logs contain the information you need to figure out if this is an issue with your step script or if it's an issue with the tool, and I don't think you need to use the debug logs. To determine that, you should be able to View the non-debug logs as a user. and figure out everything that you need. You only should have to use the debug logs to figure out bugs in this tool.

This is especially important because debug logs right now are extremely verbose and I think that's valuable but only if you are a developer of this tool.

Solution

  • display all logs that step scripts make in CI logs. encourages users to write logs. debug logs should only be valuable to devs of this tool, not to view your own logs you make when using this tool.
  • add a debug_file optional command line argument to send logs to a file. Useful to capture debug logs to send to us.

Testing

  • Added automated tests.
  • Manually tested. If you check this box, provide instructions for others to test, too.

View the logs from this PR. See if logs in the scripts are shown.

Notes for reviewers

encourages users to write logs. debug logs should only be valuable to devs of this tool, not to view your own logs you make when using this tool.
@github-actions
Copy link

github-actions bot commented Aug 16, 2025

decaf

Running deployments in test mode. Results will appear below.
If this pull request and all of it's parent pull requests are merged using the...

...🟩 merge 🟩 merge method... 🚢 The next version of the project will be: 0.2.0

Learn more
Latest release: 0.1.1
Commit of latest release: 642f275

Commits since last release:
- Merge pull request #80 from debug-logs
- fix: avoid duplicate log entries in the debug write file

In the debug log file, credit and CI server, I'm seeing some commands are displaying the standard out multiple times still.
- fix: avoid showing stdout shell command logs multiple times in debug logs

when you view debug logs, the shell command stdouts are shown multiple times.
- docs: add troubleshooting section of docs to guide users to get us debug logs when they encounter issues
- feat: add debug_file argument for writing logs to a file
- refactor: make step scripts not output deno "Download" lines anymore
- refactor: move running deploy step script into step runner

There are design patterns that have already been established for running the other step scripts. So the fact that we have a separate block of code that is only for running the deploy step script doesn't make any sense. Make the code more maintainable by moving it into the step runner, but also allow me to continue following all the same design patterns that need to be followed for all running of step scripts.
- refactor: do not send command stdout to debug logs multiple times

turns out, stdout is logged multiple times. pretty annoying when viewing in CI and causing confusion to me.
- feat: display all logs that step scripts make in CI logs

encourages users to write logs. debug logs should only be valuable to devs of this tool, not to view your own logs you make when using this tool.

decaf

Running deployments in test mode. Results will appear below.
If this pull request and all of it's parent pull requests are merged using the...

...🟩 squash 🟩 merge method... 🚢 The next version of the project will be: 0.2.0

Learn more
Latest release: 0.1.1
Commit of latest release: 642f275

Commits since last release:
- feat: display all logs that step scripts make in CI logs

Related GitHub Issues

Problem

Whenever you open a pull request and you view the test mode logs and you see a result that you did not expect, the the next thing you do is go into the CI and start looking at the logs. The problem is the debug logs contain the information you need to figure out if this is an issue with your step script or if it's an issue with the tool, and I don't think you need to use the debug logs. To determine that, you should be able to View the non-debug logs as a user. and figure out everything that you need. You only should have to use the debug logs to figure out bugs in this tool.

This is especially important because debug logs right now are extremely verbose and I think that's valuable but only if you are a developer of this tool.

Solution

  • display all logs that step scripts make in CI logs. encourages users to write logs. debug logs should only be valuable to devs of this tool, not to view your own logs you make when using this tool.
  • add a debug_file optional command line argument to send logs to a file. Useful to capture debug logs to send to us.

Testing

  • Added automated tests.
  • Manually tested. If you check this box, provide instructions for others to test, too.

View the logs from this PR. See if logs in the scripts are shown.

Notes for reviewers

decaf

Running deployments in test mode. Results will appear below.
If this pull request and all of it's parent pull requests are merged using the...

...🟩 rebase 🟩 merge method... 🚢 The next version of the project will be: 0.2.0

Learn more
Latest release: 0.1.1
Commit of latest release: 642f275

Commits since last release:
- fix: avoid duplicate log entries in the debug write file

In the debug log file, credit and CI server, I'm seeing some commands are displaying the standard out multiple times still.
- fix: avoid showing stdout shell command logs multiple times in debug logs

when you view debug logs, the shell command stdouts are shown multiple times.
- docs: add troubleshooting section of docs to guide users to get us debug logs when they encounter issues
- feat: add debug_file argument for writing logs to a file
- refactor: make step scripts not output deno "Download" lines anymore
- refactor: move running deploy step script into step runner

There are design patterns that have already been established for running the other step scripts. So the fact that we have a separate block of code that is only for running the deploy step script doesn't make any sense. Make the code more maintainable by moving it into the step runner, but also allow me to continue following all the same design patterns that need to be followed for all running of step scripts.
- refactor: do not send command stdout to debug logs multiple times

turns out, stdout is logged multiple times. pretty annoying when viewing in CI and causing confusion to me.
- feat: display all logs that step scripts make in CI logs

encourages users to write logs. debug logs should only be valuable to devs of this tool, not to view your own logs you make when using this tool.

@coveralls
Copy link

coveralls commented Aug 16, 2025

Pull Request Test Coverage Report for Build 17068274896

Details

  • 17 of 30 (56.67%) changed or added relevant lines in 5 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.1%) to 74.87%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/exec.ts 2 5 40.0%
lib/log.ts 6 16 37.5%
Files with Coverage Reduction New Missed Lines %
lib/log.ts 4 68.75%
Totals Coverage Status
Change from base Build 17008633692: -0.1%
Covered Lines: 882
Relevant Lines: 1196

💛 - Coveralls

turns out, stdout is logged multiple times. pretty annoying when viewing in CI and causing confusion to me.
There are design patterns that have already been established for running the other step scripts. So the fact that we have a separate block of code that is only for running the deploy step script doesn't make any sense. Make the code more maintainable by moving it into the step runner, but also allow me to continue following all the same design patterns that need to be followed for all running of step scripts.
@levibostian levibostian marked this pull request as ready for review August 16, 2025 14:29
…logs

when you view debug logs, the shell command stdouts are shown multiple times.
In the debug log file, credit and CI server, I'm seeing some commands are displaying the standard out multiple times still.
@levibostian levibostian merged commit da09080 into main Aug 19, 2025
5 checks passed
@levibostian levibostian deleted the debug-logs branch August 19, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants