Skip to content

display ROFL component messages #684

@HarryR

Description

@HarryR

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions