Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output to file #314

Open
theGhostJW opened this issue Aug 3, 2024 · 4 comments
Open

Output to file #314

theGhostJW opened this issue Aug 3, 2024 · 4 comments
Labels
linear Created by Linear-GitHub Sync

Comments

@theGhostJW
Copy link
Contributor

theGhostJW commented Aug 3, 2024

Describe the feature you’d like to be implemented

In ghcid I can have the console output also copied to a log file as text (not json log format) by adding an -o switch

e.g. ghcid --command 'cabal repl' pyrethrum --allow-eval --clear --no-height-limit '-o ghcid.log'

it would be great to have an equivalent feature in ghciwatch.

List alternatives to the feature and their pros and cons

No response

Additional context

I have found this feature very useful for debugging output which were long lists of pretty printed logs

@github-actions github-actions bot added the linear Created by Linear-GitHub Sync label Aug 3, 2024
@9999years
Copy link
Member

Does the --error-file option fill this need?

@theGhostJW
Copy link
Contributor Author

Hi,
No its not the same. I am running endpoints which generate large pretty printed log entries being printed to stdout with putStrLn. When I run the above ghci command I get the full log (actually the full console output) written to the ghcid.log file.

If I use --error-file with ghiwatch I just get a log of the initial load error that triggers the lazy loading of the required modules and nothing else. So I guess --error-file is doing as described on the box and just logging errors where as ghcid's -o ghcid.log is giving me everything.

@9999years
Copy link
Member

OK, so you also want to redirect the GHCi session's stdout to a file?

@theGhostJW
Copy link
Contributor Author

Yes, that's it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

2 participants