Skip to content

Instantly share code, notes, and snippets.

@changx03
Created June 12, 2024 03:24
Show Gist options
  • Save changx03/ba573ef3e8563b2fa166569951238620 to your computer and use it in GitHub Desktop.
Save changx03/ba573ef3e8563b2fa166569951238620 to your computer and use it in GitHub Desktop.
Color console outputs for ROS2 in grc
# Message after [WARN]
regexp=\[WARN\](?:.*\[.*\].*\[.*\]: )(.*)$
colours=bright_yellow
=====
# Message after [ERROR]
regexp=\[ERROR\](?:.*\[.*\].*\[.*\]: )(.*)$
colours=bright_red
=====
# Brackets in green
regexp=\[|\]
colours=green
=====
# [INFO] in green
regexp=\[INFO\]
colours=bright_green
=====
# [WARN] keyword in yellow
regexp=\[WARN\]
colours=bright_yellow
=====
# [ERROR] keyword in red
regexp=\[ERROR\]
colours=bright_red
=====
# Timestamp in cyan
regexp=\[[0-9]+\.[0-9]+\]
colours=cyan
=====
# Node names. Assuming node names are alphanumeric with underscores.
regexp=\[[a-zA-Z0-9_]+\]:
colours=magenta
=====
# Colon after the node name in cyan
regexp=(?<=\w)\:
colours=cyan
=====
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment