Skip to content

Instantly share code, notes, and snippets.

@Maysora
Last active December 4, 2025 07:05
Show Gist options
  • Select an option

  • Save Maysora/4dc6accf40f761e9d2cd7a7532fd7df1 to your computer and use it in GitHub Desktop.

Select an option

Save Maysora/4dc6accf40f761e9d2cd7a7532fd7df1 to your computer and use it in GitHub Desktop.
Rails logger sublimetext completions
// Rails logging snippets, inspired by https://rubystacknews.com/2025/12/01/debugging-in-real-life-how-i-use-rails-logger-and-docker-logs-in-my-daily-workflow/
{
"scope": "source.ruby,text.html.ruby",
"completions": [
{ "trigger": "rld", "contents": "Rails.logger.debug \"\\e[1;30;102m>>>> #{${1:$SELECTION}}\\e[0m\"", "kind": ["snippet", "L", "Logging"], "annotation": "Rails.logger.debug" },
{ "trigger": "rli", "contents": "Rails.logger.info \"\\e[1;15;104m|||| #{${1:$SELECTION}}\\e[0m\"", "kind": ["snippet", "L", "Logging"], "annotation": "Rails.logger.info" },
{ "trigger": "rlw", "contents": "Rails.logger.warn \"\\e[1;30;103m!!!! #{${1:$SELECTION}}\\e[0m\"", "kind": ["snippet", "L", "Logging"], "annotation": "Rails.logger.warn" },
{ "trigger": "rle", "contents": "Rails.logger.error \"\\e[1;30;101m#### #{${1:$SELECTION}}\\e[0m\"", "kind": ["snippet", "L", "Logging"], "annotation": "Rails.logger.error" }
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment