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

Add sql query highlighting #5

Open
vladshcherbin opened this issue Apr 27, 2019 · 2 comments
Open

Add sql query highlighting #5

vladshcherbin opened this issue Apr 27, 2019 · 2 comments

Comments

@vladshcherbin
Copy link

vladshcherbin commented Apr 27, 2019

Hey 👋

I was using very similar plugin for knex logging and decided to publish it or find a similar one. I found this package and tried it. It fits my needs, the only thing I miss is syntax highlighting, I have it in mine and it helps in reading queries.

Here is an example of a small query (top - this package, bottom - mine):

Screen Shot 2019-04-27 at 04 30 36

It helps even more with larger queries and also looks same way as in some sql clients, for example postico (I'm using it), same query:

Screen Shot 2019-04-27 at 04 35 22

So, the question is if you are okay with this feature? I can add a PR with it.

Thanks

@khmm12
Copy link
Owner

khmm12 commented Apr 12, 2020

Hey @vladshcherbin! Thank for your feedback!

I'm planning to release new version with better logger configuration to give developers ability to pass any formatter that they want.

I don't want to blow up the library with syntax highlighting. But I keep in my mind a compromise solution to publish packages with some prebuilt formatting like plain or with syntax highlighting. I hope so much that I won't give up the idea 🙏.

@vladshcherbin
Copy link
Author

vladshcherbin commented Apr 20, 2020

@khmm12 it's almost possible to pass a custom logger here.

It returns format, colorized time and colorized query. For my needs I want clean time and query, without colors. I'll pass them to custom color function and receive it syntax highlighted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants