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

display ROFL component messages #684

Open
HarryR opened this issue Jan 21, 2025 · 0 comments
Open

display ROFL component messages #684

HarryR opened this issue Jan 21, 2025 · 0 comments

Comments

@HarryR
Copy link

HarryR commented Jan 21, 2025

When developing ROFL apps anything that's printed to stdout by the component is dumped into the compute-0/node.log file, however it's a massive pain to jump into the container and remember exactly which file to tail and grep through the spam.

Instead, I suggest that this info is output to the console, after it says Container start-up took NN seconds...

I'm using this command:

tail -f /serverdir/node/net-runner/network/compute-0/node.log | jq -rc 'select(.component == "rofl") | .component + " " + .ts + ": " + .msg'

Which gives output like:

rofl 2025-01-21T17:28:42.683556852Z: Block Received!
rofl 2025-01-21T17:28:44.550116259Z: Block Received!

You can combine this into a single command via Make, but it's a pain

rofl-logs:
    docker exec $(shell docker ps --format json | jq -rc 'select(.Image|test("sapphire-localnet")) | .Names') bash -c 'tail -f /serverdir/node/net-runner/network/compute-0/node.log' | jq -rc 'select(.component == "rofl") | .component + " " + .ts + ": " + .msg'
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

No branches or pull requests

1 participant