BREAKING CHANGE: In general, callbacks do not work with a "flushing"
app due to the asynchronous nature of HTTP requests and dealing with
errors and retries. Using an EventEmitter is much more appropriate.
Helper functions are broken out to declutter the class file
configs.js was renamed to the more appropriate constants.js
Made all variables consistent in naming convention (lowerCamelCase)
Added EventEmitter for successes, warnings and errors
Fixed retry logic and possibility for double timers
Fixed race condition with clearing a single buffer. Now, multiple
buffers are used so that they can be independently cleared. This
fixes a race condition where lines that were added during the HTTP
request could be removed without being sent
log() Options as a string must now be a log level. TypeError if not.
Properly handles opts.meta, opts.context and this.meta
according to indexMeta
Removed sizeof since it was buggy. Logic replaced with .length
of the lines
Added meta to the constructor so that it can easily be set without
needing to call addMetaProperty after instantiation.
Fixed map transitions; No dynamic addition of object properties or
delete usage.
ip can now be an IPv6 address
Added a loadtest.js test to ensure there is not data loss
Exponential Backoff with Jitter algorithm implemented for HTTP retries
BREAKING CHANGE: In general, callbacks do not work with a "flushing" app due to the asynchronous nature of HTTP requests and dealing with errors and retries. Using an EventEmitter is much more appropriate.
CHANGE LIST:
debug
since it's not compatible everywhere. See issue (https://github.com/logdna/nodejs/issues/89)class Logger
forces the use of thenew
keywordconfigs.js
was renamed to the more appropriateconstants.js
log()
Options as a string must now be a log level. TypeError if not.indexMeta
sizeof
since it was buggy. Logic replaced with.length
of the linesmeta
to the constructor so that it can easily be set without needing to calladdMetaProperty
after instantiation.delete
usage.ip
can now be an IPv6 addressSemver: major Ref: LOG-6626