Created
August 30, 2014 05:21
-
-
Save ainoya/a635a684180c09099494 to your computer and use it in GitHub Desktop.
websocket logger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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