File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 2020import os
2121
2222
23- def configure (cls , path = None ):
23+ def configure (instance , path = None ):
2424 """ Configure logging for the app containing a class and get its logger
2525
2626 This function expects a Splunk app directory structure:
@@ -51,6 +51,7 @@ def configure(cls, path=None):
5151 :type path: str or NoneType
5252
5353 """
54+ cls = type (instance )
5455 logger_name = cls .__name__
5556 module = inspect .getmodule (cls )
5657 app_directory = os .path .dirname (os .path .dirname (module .__file__ ))
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def __init__(self):
4040
4141 # Variables that may be used, but not altered by derived classes
4242
43- self .logger , self ._logging_configuration = logging .configure (type ( self ) )
43+ self .logger , self ._logging_configuration = logging .configure (self )
4444 self .input_header = InputHeader ()
4545 self .messages = MessagesHeader ()
4646
@@ -77,7 +77,7 @@ def logging_configuration(self):
7777 @logging_configuration .setter
7878 def logging_configuration (self , value ):
7979 self .logger , self ._logging_configuration = logging .configure (
80- type ( self ) , value )
80+ self , value )
8181 return
8282
8383 @Option
You can’t perform that action at this time.
0 commit comments