seaborn_logger/logger.py
def findCaller(self, stack_info=False):
        """
        Find the stack frame of the caller so that we can note the source
        file name, line number and function name.
        """
        f = logging.currentframe()
        # On some versions of IronPython, currentframe() returns None if
        # IronPython isn't run with -X:Frames.
        if f is not None:
            f = f.f_back
        rv = "(unknown file)", 0, "(unknown function)"
        while hasattr(f, "f_code"):
            co = f.f_code
            filename = os.path.normcase(co.co_filename)
            if filename == logging._srcfile or filename == self._srcfile:
                f = f.f_back
                continue
            rv = (co.co_filename, f.f_lineno, co.co_name)
            if stack_info:
                sio = io.StringIO()
                sio.write('Stack (most recent call last):\n')
                traceback.print_stack(f, file=sio)
                sinfo = sio.getvalue()
                if sinfo[-1] == '\n':
                    sinfo = sinfo[:-1]
                sio.close()
            break
        return rv
def findCaller(self, stack_info=False):
        f = logging.currentframe()
        # On some versions of IronPython, currentframe() returns None if
        # IronPython isn't run with -X:Frames.
        if f is not None:
            f = f.f_back
        rv = "(unknown file)", 0, "(unknown function)"
        while hasattr(f, "f_code"):
            co = f.f_code
            filename = os.path.normcase(co.co_filename)
            if filename == logging._srcfile or filename == self._srcfile:
                f = f.f_back
                continue
            rv = (co.co_filename, f.f_lineno, co.co_name)
            if stack_info:
                sio = io.StringIO()
                sio.write('Stack (most recent call last):\n')
                traceback.print_stack(f, file=sio)
                sinfo = sio.getvalue()
                if sinfo[-1] == '\n':
                    sinfo = sinfo[:-1]
                sio.close()
            break
        return rv
def findCaller ( self , stack_info = False ) : f = logging . currentframe ( ) # On some versions of IronPython, currentframe() returns None if # IronPython isn't run with -X:Frames. if f is not None : f = f . f_back rv = "(unknown file)" , 0 , "(unknown function)" while hasattr ( f , "f_code" ) : co = f . f_code filename = os . path . normcase ( co . co_filename ) if filename == logging . _srcfile or filename == self . _srcfile : f = f . f_back continue rv = ( co . co_filename , f . f_lineno , co . co_name ) if stack_info : sio = io . StringIO ( ) sio . write ( 'Stack (most recent call last):\n' ) traceback . print_stack ( f , file = sio ) sinfo = sio . getvalue ( ) if sinfo [ - 1 ] == '\n' : sinfo = sinfo [ : - 1 ] sio . close ( ) break return rv
Find the stack frame of the caller so that we can note the source
        file name, line number and function name.
Find the stack frame of the caller so that we can note the source file name line number and function name .