RequestLogs Body Type Causes SQL Truncation Issue with ORMLite

The RequestLogEntry class defines the RequestBody as a string type (as opposed to say the RequestDTO which is an object). As a result, when OrmLite creates the SQL table for the RequestLogEntry object (if one is using SQL & OrmLite as their trace log provider) it creates a field of varchar(8000) for RequestBody and varchar(MAX) for RequestDTO. Such that if an API client sends a body larger than 8000 chars, the request will fail since the logger can’t log the request. Is it possible to change the type to object (or decorate with an attribute) so that if a request comes in over 8000 bytes, we capture it? I may want, in my API to limit it somehow, but I want to log all requests coming in.


I’ve made it a text field in this commit.

This change is available from v5.0.3 that’s now available on MyGet. If you want OrmLite to create the table with a text field you’ll need to delete the existing table, otherwise you can just change the type of the column.

Outstanding - thanks!