lib/metricsd.rb in metricsd-0.2.2 vs lib/metricsd.rb in metricsd-0.2.3

- old
+ new

@@ -70,10 +70,20 @@ # Sets the default source for all metrics. def default_source=(source) @@default_source = source end + # Gets the default group for all metrics. + def default_group + @@default_group + end + + # Sets the default group for all metrics. + def default_group=(group) + @@default_group = group + end + # Gets the logger used to output errors or warnings. def logger @@logger ||= if defined?(Rails) Rails.logger elsif defined?(Loops) @@ -93,9 +103,10 @@ @@server_host = '127.0.0.1' @@server_port = 6311 @@enabled = true @@source = Socket.gethostname[/^([^.]+)/, 1] @@default_source = 'all' + @@default_group = nil @@logger = nil end end reset_defaults!