Skip to content

Release 2.0

Compare
Choose a tag to compare
@deankarn deankarn released this 24 May 14:09
· 90 commits to master since this release

Version 2.0 Released!

Whats New?

  • Refined existing handlers, now a little more efficient and faster
  • Removed a few methods from the handlers that are not strictly necessary and cluttering things up.
  • Added ability to set the individual log levels to gather file + line number information for using the function SetCallerInfoLevels(...), the default is all except TraceLevel, InfoLevel and NoticeLevel.
  • Add ability per handler to specify if want full file path, minus gopath, for short file ( just filename ) when file + line number data is present.
  • Added function SetCallerSkipDiff(...), this is for other libraries that may want to wrap this library, but then need to increase the caller skip level to accurately report the file + line number information.
  • Updating default time format to include nanoseconds DefaultTimeFormat = "2006-01-02T15:04:05.000000000Z07:00"
  • Added HasHandlers() function which returns if there are any handlers registered with the library; useful when a library would like to log but the main application may not has specified any handlers or the main application is not using this library to log, and can register it's own default logger.
  • Updated handlers to allow for better overriding of default formatter if desired.
  • Add ability to set not only the log buffer, but also number of workers you want to spin up and listen on that buffer within the bultin handlers.
  • Add http handler for use with many different endpoints, such as Elasticsearch, JSON, ... thanks to @hartfordfive

Breaking changes

for most, there will be none but had to bump the version for anyone that may have been using some of the functions that were removed, replaced or updated; here is a list of the functions:

  • SetCallerInfo(..) --- now ---> SetCallerInfoLevels(...)
For Handlers
  • UseMiniTimestamp - Removed
  • SetColorLevel(..) --> Removed
  • SetBuffer(...) --- now ---> SetBuffersAndWorkers(...)
  • may have missed some...