Continuing the discussion from How to fetch truncated custom application logs:
I did not see above post in time for me to suggest solution but for anyone who still may be needing a solution, following is what I used.
Create a local function for logging like this:
function log(msg) {
JSON.stringify(msg).match(/.{1,2000}/g).forEach( (x) => console.log(x))
}