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

Disable log for some query #4223

Closed
wenerme opened this issue Apr 14, 2023 · 4 comments
Closed

Disable log for some query #4223

wenerme opened this issue Apr 14, 2023 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@wenerme
Copy link

wenerme commented Apr 14, 2023

Is your feature request related to a problem? Please describe.

By using sequelize I can disable log like

const user = await User.findOne({  
  logging: false,
  where: { id: 2207 }
})

When upsert or insert many rows, this is very helpful, I want to disable some log when using mikro orm.

Describe the solution you'd like

Maybe add or logging to the second option ?

Describe alternatives you've considered

als control the Logger

Additional context

@wenerme wenerme added the enhancement New feature or request label Apr 14, 2023
@B4nan
Copy link
Member

B4nan commented Apr 22, 2023

cc @SpencerKaiser, since you were already working with the query logging, this one could be a simple task for you? :]

@SpencerKaiser
Copy link
Contributor

@B4nan yea that'd work out nicely as an addition after the logger context stuff gets added in! I'll take a look as soon the other is completed and merged 🙂

@B4nan
Copy link
Member

B4nan commented Apr 25, 2023

Would be great to make this work both ways - logging: true would enforce logging even if it's globally disabled, while logging: false would disable it when it's globally enabled.

@B4nan
Copy link
Member

B4nan commented May 5, 2023

Implemented in v6 via #4273

@B4nan B4nan closed this as completed May 5, 2023
jsprw pushed a commit to jsprw/mikro-orm-full-text-operators that referenced this issue May 7, 2023
@darky darky mentioned this issue Jan 8, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants