Skip to content

Instantly share code, notes, and snippets.

@ainoya
Created August 30, 2014 05:21
Show Gist options
  • Save ainoya/a635a684180c09099494 to your computer and use it in GitHub Desktop.
Save ainoya/a635a684180c09099494 to your computer and use it in GitHub Desktop.
websocket logger
class WSLogger
def initialize(ws)
@ws = ws
end
def write(*args)
@ws.send(*args)
end
def close
end
end
# usage
@logger= Logger.new(WSLogger.new(ws))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment