File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ class Event:
4
4
def __init__ (self , label , data , ** kwargs ):
5
5
if not isinstance (data , dict ) :
6
6
raise Exception ("data must be dict" )
7
- l = kwargs . has_key ( " logger" ) and kwargs ['logger' ] or logger .get_global_logger ()
7
+ l = ( ' logger' in kwargs ) and kwargs ['logger' ] or logger .get_global_logger ()
8
8
l .emit (label , data )
Original file line number Diff line number Diff line change 10
10
global_logger = None
11
11
12
12
def setup (tag , ** kwargs ):
13
- host = kwargs . has_key ( " host" ) and kwargs ['host' ] or 'localhost'
14
- port = kwargs . has_key ( " port" ) and kwargs ['port' ] or 24224
13
+ host = ( ' host' in kwargs ) and kwargs ['host' ] or 'localhost'
14
+ port = ( ' port' in kwargs ) and kwargs ['port' ] or 24224
15
15
16
16
global global_logger
17
17
global_logger = FluentLogger (tag , host = host , port = port )
You can’t perform that action at this time.
0 commit comments