How to log each request
See original GitHub issueMaybe a stupid question, but I haven’t been able to find an answer combing through the docs, google, and the issues:
How can I console.log each sql statement executed? (for debugging purposes, of course).
I usually use Sequelize, and with Sequelize it is just a matter of setting config.logging = true
(or a custom function if you want). But I don’t see anything that can do the same thing just using mssql.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Spring Boot - How to log all requests and responses with ...
You can use Actuator in Spring Boot. It logs requests and responses and more information about servlet and system operating ...
Read more >Spring - Log Incoming Requests - Baeldung
In this quick tutorial, we'll demonstrate the basics of logging incoming requests using Spring's logging filter.
Read more >Should I be logging every request in a web application?
I would say both yes and no, and here's why. Yes, all requests should be logged. No, you should not be logging them....
Read more >Log request and responses of REST APIs in SpringBoot
Today we will see a way to log requests and responses of APIs without inserting logger messages in each controller method of a...
Read more >Log Incoming Requests In Spring - Java Development Journal
How to Log Incoming Requests In Spring. In this post, we will explore as of how to Log Incoming Requests In Spring.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
node-mssql uses the debug package (with ‘mssql:tedious’ or ‘mssql:msnodesql’) so you can do
DEBUG=mssql:* node app.js
to make it print the sql statements.Example output:
https://github.com/tediousjs/tedious/issues/713 seems slightly unrelated, that’s asking more about resolving stored procedures to their underlying query at execution time.
This issue is no longer open because it is possible using the DEBUG library.
If you have an SQL syntax error, the best thing to do is get your debugger out and see what’s going wrong if you can’t determine it by inspecting the code.