• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(16540)  |  Call(15427)  |  Derive(0)  |  Import(1113)
Return a logger with the specified name, creating it if necessary.

If no name is specified, return the root logger.

        def getLogger(name=None):
    """
    Return a logger with the specified name, creating it if necessary.

    If no name is specified, return the root logger.
    """
    if name:
        return Logger.manager.getLogger(name)
    else:
        return root
        


src/p/y/pyogp.apps-0.1dev/pyogp/apps/examples/parse_packets.py   pyogp.apps(Download)
import traceback
from pyogp.lib.base.message.udpdeserializer import UDPMessageDeserializer
from pyogp.lib.base.settings import Settings
from logging import getLogger, StreamHandler, Formatter, CRITICAL, ERROR, WARNING, INFO, DEBUG
 
logger = getLogger('parse_packet')
 

src/c/h/changingsong-HEAD/trunk/samples/debug_mode/debugmode.py   changingsong(Download)
def init_logging(level=logging.ERROR,  file=None):
    logging.basicConfig(level=level,
            format='%(asctime)s %(name)-15s %(levelname)-8s %(message)s')
            #datefmt='%m-%d %H:%M')
    log = logging.getLogger('main')
    # test levels:
    log.error('this is error msg')
if __name__ == "__main__":
    (loglevel,  logfile) = opts_parse()
    init_logging(loglevel)
    log = logging.getLogger('main')
    app = QApplication(sys.argv)
    window = MainWindowDlg(loglevel)
    window.showMaximized()

src/c/h/changingsong-HEAD/samples/debug_mode/debugmode.py   changingsong(Download)
def init_logging(level=logging.ERROR,  file=None):
    logging.basicConfig(level=level,
            format='%(asctime)s %(name)-15s %(levelname)-8s %(message)s')
            #datefmt='%m-%d %H:%M')
    log = logging.getLogger('main')
    # test levels:
    log.error('this is error msg')
if __name__ == "__main__":
    (loglevel,  logfile) = opts_parse()
    init_logging(loglevel)
    log = logging.getLogger('main')
    app = QApplication(sys.argv)
    window = MainWindowDlg(loglevel)
    window.showMaximized()

src/c/e/cerebrum-HEAD/trunk/cerebrum/clients/examples/bofh.py   cerebrum(Download)
def setup_logger(debug_log):
    """Setup logging.  If debug_log=True, we log debug info to a file.
    Otherwise we setup a stdout-logger for loglevel ERROR (as those
    are indications of bugs that needs fixing)"""
 
    global logger
    logger = logging.getLogger("pybofh")

src/c/e/cerebrum-HEAD/cerebrum/clients/examples/bofh.py   cerebrum(Download)
def setup_logger(debug_log):
    """Setup logging.  If debug_log=True, we log debug info to a file.
    Otherwise we setup a stdout-logger for loglevel ERROR (as those
    are indications of bugs that needs fixing)"""
 
    global logger
    logger = logging.getLogger("pybofh")

src/p/y/python-ogre-HEAD/trunk/python-ogre/demos/SampleFramework.py   python-ogre(Download)
    # add the handler to the root logger
    logging.getLogger('').addHandler(console)
 
    logger = logging.getLogger(logidentifier)
 
def info ( msg ):
    if logger:

src/s/p/spring-python-HEAD/samples/petclinic/cherrypy/petclinic.py   spring-python(Download)
    # This turns on debugging, so you can see everything Spring Python is doing in the background
    # while executing the sample application.
 
    logger = logging.getLogger("springpython")
    loggingLevel = logging.DEBUG
    logger.setLevel(loggingLevel)
    ch = logging.StreamHandler()

src/s/p/spring-python-HEAD/samples/petclinic/cherrypy/petclinic-xml.py   spring-python(Download)
    # This turns on debugging, so you can see everything Spring Python is doing in the background
    # while executing the sample application.
 
    logger = logging.getLogger("springpython")
    loggingLevel = logging.DEBUG
    logger.setLevel(loggingLevel)
    ch = logging.StreamHandler()

src/s/p/spring-python-HEAD/samples/petclinic/cherrypy/petclinic-server.py   spring-python(Download)
    # This turns on debugging, so you can see everything Spring Python is doing in the background
    # while executing the sample application.
 
    logger = logging.getLogger("springpython")
    loggingLevel = logging.DEBUG
    logger.setLevel(loggingLevel)
    ch = logging.StreamHandler()

src/s/p/spring-python-HEAD/samples/petclinic/cherrypy/petclinic-server-xml.py   spring-python(Download)
 
if __name__ == '__main__':
 
    logger = logging.getLogger("springpython")
    loggingLevel = logging.DEBUG
    logger.setLevel(loggingLevel)
    ch = logging.StreamHandler()

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next