I'm using the TSparkleLoggingMiddleware but when there is an error it only saves
[Value: POST /AlphaServer/Guest 500 - 1.31 ms]
How can I get the error message saved so I know what the issue was?
Thanks
I'm using the TSparkleLoggingMiddleware but when there is an error it only saves
[Value: POST /AlphaServer/Guest 500 - 1.31 ms]
How can I get the error message saved so I know what the issue was?
Thanks
That's logging middleware logging the requests, and that's all info it logs from requests.
If the 500 error was caused by an exception and such exception is caught by the logging middleware, then it will log the exception itself (that is enable by LogExceptions property).
But if the 500 error was just returned without an exception leaking, then that's all info you will have.
so in a XData server what sort of an error on a CRUD post wouldn't be caused by an Exception?
In a CRUD endpoint, I believe mostly is caused by exceptions.
But have you configured a log output handler which outputs log messages of level Error
?
Where are you getting this message output to, and how have you configured its output?
Here are the settings
I'm asking about the code where you set the logging output handler.
In other words:
Where does it "saves" such information? How did you configure it?
It saves to the database
TMSDefaultLogger.RegisterOutputHandlerClass(TTMSLoggerAureliusOutputHandler, [TValue.From<IDBConnectionPool>(XDataConnectionPool.GetPoolInterface)]);
If you are not filtering it out to log only trace messages, but also error messages, you should also see the error log messages in the same table.