1
0
mirror of https://github.com/meineerde/rackstash.git synced 2025-12-25 08:51:12 +00:00
rackstash/lib/rackstash.rb
Holger Just 407b52120a Add basic fields to hold additional data on Buffers
The fields follow the basic structure of basic Hashes and Arrays but
provide an interface better suitable for us. Specifically:

* They check and enforce the datatypes for keys and values to be
  strictly JSON-conforming. Only the basic data-types are accepted
  respectively converted to.
* Hashes only accept String keys.
* Basic values are always frozen.
2017-02-02 15:04:02 +01:00

30 lines
565 B
Ruby

# Copyright 2017 Holger Just
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE.txt file for details.
require 'set'
require 'rackstash/version'
module Rackstash
SEVERITIES = [
DEBUG = 0,
INFO = 1,
WARN = 2,
ERROR = 3,
FATAL = 4,
UNKNOWN = 5
].freeze
PROGNAME = "rackstash/v#{Rackstash::VERSION}".freeze
EMPTY_STRING = ''.freeze
EMPTY_SET = Set.new.freeze
# How many decimal places to render on ISO 8601 timestamps
ISO8601_PRECISION = 3
end
require 'rackstash/logger'