-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
added rails-log as an 3rd-party language #2526
Conversation
modified the ruby.js language to provide better syntax highlighting for Rails Unicorn logging.
fixed an issue with string definitions
improved string parsing
a modified ruby.js language definition to provide better syntax highlighting for Rails Unicorn logging.
This reverts commit d2e56d0.
This reverts commit 6d24803.
I didn't look closely before. How is this different from Ruby? Did you just add
? |
Why would there be raw Ruby code in the output of the Rails log? Like an exception? |
Did you just add
'Rendering Rendered Completed Started POST Processing by Redirected to Delivered mail Performed GET'
?
Theres a number of small regex tweaks which give a much better result in Unicorn logging
If the changes could be merged into the ruby language, that would be maybe cleaner than a whole new third party language
Why would there be raw Ruby code in the output of the Rails log? Like an exception?
Yup
… On 4 May 2020, at 12:11 am, Josh Goebel ***@***.***> wrote:
Why would there be raw Ruby code in the output of the Rails log? Like an exception?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#2526 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABX4BEDNWKH7KZQCJQTQXOLRPXTXRANCNFSM4MYJ5LBQ>.
|
I'd be curious to see a diff against I was about to say with only the keywords you could do this with a few lines of code... (see |
here's an example:
|
So far it looks like the better/simpler choice might be to concentrate on parsing the log file itself and use the real |
If this is mostly/solely for unicorn I'm wondering if Thoughts? We haven't had any name collisions yet, but I'm trying to plan ahead. Although I guess we could just list both and always let a person decide which to use. :) |
here's a diff: |
oops, closed accidentally |
What kind of diff is that? My editor doesn't like it one bit and won't color it. |
I created it like so: |
Ok, wow most themes have terrible support for diffs in VS code. Annoying. :) |
Yeah all these changes to work around line endings would probably have been better handled by Ruby as a sublanguage. And then only turn on the Ruby parsing for those parts of the line that are actually Ruby code. And the parent rule could always force the Ruby to end at the end of each line and then you wouldn't need to hack Ruby itself. Any thoughts on the naming? |
I can change the name no problem. |
We have reasonable documentation and you can look at some of our grammars for samples... like XML can includes CSS and JS sublanguages, etc... |
nice one thx. |
added unicorn-rails-log language repo
new pull request here: |
This PR would have still worked, but whatever. :) Thanks for contributing! |
modified the ruby.js language to provide better syntax highlighting for Rails Unicorn logging.