lib/semantic_logger/appender/udp.rb in semantic_logger-4.2.2 vs lib/semantic_logger/appender/udp.rb in semantic_logger-4.3.0
- old
+ new
@@ -46,23 +46,27 @@
# RegExp: Only include log messages where the class name matches the supplied.
# regular expression. All other messages will be ignored.
# Proc: Only include log messages where the supplied Proc returns true
# The Proc must return true or false.
#
+ # metrics: [Boolean]
+ # Send metrics only events over udp.
+ # Default: true
+ #
# Limitations:
# * UDP packet size is limited by the connected network and any routers etc
# that the message has to traverse. See https://en.wikipedia.org/wiki/Maximum_transmission_unit
#
# Example:
# SemanticLogger.add_appender(
# appender: :udp,
# server: 'server:3300'
# )
- def initialize(server:, udp_flags: 0, level: nil, formatter: nil, filter: nil, application: nil, host: nil, &block)
+ def initialize(server:, udp_flags: 0, metrics: true, **args, &block)
@server = server
@udp_flags = udp_flags
- super(level: level, formatter: formatter, filter: filter, application: application, host: host, &block)
+ super(metrics: metrics, **args, &block)
reopen
end
# After forking an active process call #reopen to re-open
# open the handles to resources