stritti / log4js

Log4js - The Logging Framework for JavaScript with no runtime dependencies
https://stritti.github.io/log4js/
Apache License 2.0
448 stars 58 forks source link

loggly Appender errors #23

Closed awb99 closed 6 years ago

awb99 commented 7 years ago

This are error messages I get. The appender works sometimes. Sometimes, it brings this messageS:

log4js.logglyAppender - error occurred:  Error: Unspecified error from Loggly: SyntaxError: Unexpected token < in JSON at position 0
    at /home/h/Documents/cititrip/node_modules/loggly/lib/loggly/client.js:161:18
    at Request._callback (/home/h/Documents/cititrip/node_modules/loggly/lib/loggly/common.js:139:7)
    at Request.self.callback (/home/h/Documents/cititrip/node_modules/loggly/node_modules/request/request.js:187:22)
    at emitTwo (events.js:125:13)
    at Request.emit (events.js:213:7)
    at Request.<anonymous> (/home/h/Documents/cititrip/node_modules/loggly/node_modules/request/request.js:1048:10)
    at emitOne (events.js:115:13)
    at Request.emit (events.js:210:7)
    at IncomingMessage.<anonymous> (/home/h/Documents/cititrip/node_modules/loggly/node_modules/request/request.js:969:12)
    at emitNone (events.js:110:20)
    at IncomingMessage.emit (events.js:207:7)
    at endReadableNT (_stream_readable.js:1045:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
stritti commented 6 years ago

You schould not send "<" in JSON.