Skip to content

Fully integrate stdlib/Logging, specialized WebSocketLogger

Compare
Choose a tag to compare
@hustf hustf released this 20 Feb 17:13
· 101 commits to master since this release
027514d

New exports:

  • @WSLog (which just has a slightly higher importance level than @info)
  • Wslog = Base.CoreLogging.LogLevel(50)
  • WebSocketLogger

Differences to stdlib/Logging/ConsoleLogger:

  • default timestamp on logging messages (except @info)
  • @info, @debug, @warn etc. will splat the first argument if it's a tuple argument. Also, colorful, context sensitive output is preserved in the first argument.
  • a 'shouldlog' function can be passed in. The shouldlog_default function filters
    on HTTP.Servers messages as well as on message_limits
  • :wslog => true flag which could be used for context-sensitive output
    from 'show' methods. This means a user could define 'show' methods
    which are used with this logger without affecting the behaviour
    defined in other modules.
  • :limited => true is included in the default IOContext. Keyword: show_limited
  • string_with_env_ws for easy overloading on specific types in this context