-
Notifications
You must be signed in to change notification settings - Fork 151
Log events
krisleech edited this page Oct 7, 2014
·
1 revision
Logging events to a file takes a little extra setup. You can use the LoggerBroadcaster
to wrap the default broadcaster with logging.
In a Rails app you would do the following:
# config/initializers/wisper.rb
Wisper.configure do |config|
config.broadcaster :default, LoggerBroadcaster.new(Rails.logger, SendBroadcaster.new)
config.broadcaster :async, LoggerBroadcaster.new(Rails.logger, SidekiqBroadcaster.new) # if using async
end
The LoggerBroadcaster
write all received events to the given logger (1st argument) and then delegates the broadcasting to the given broadcaster (2nd argument).
Need to ask a question? Please ask on StackOverflow tagging the question with wisper.
Found a bug? Please report it on the Issue tracker.