~janusz-martyniak/mice-raw-datamover/trunk

« back to all changes in this revision

Viewing changes to devel/mylogging1.py

  • Committer: martynia
  • Date: 2013-11-26 14:28:36 UTC
  • Revision ID: martynia@heppc184.hep.ph.ic.ac.uk-20131126142836-6pkn3g6whcblebh1
 initial datamover commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# To change this template, choose Tools | Templates
 
2
# and open the template in the editor.
 
3
 
 
4
__author__="martynia"
 
5
__date__ ="$18-Jun-2010 18:29:17$"
 
6
import logging
 
7
import logging.config
 
8
 
 
9
logging.config.fileConfig("logging.conf")
 
10
 
 
11
# create logger
 
12
logger = logging.getLogger("simpleExample")
 
13
 
 
14
# "application" code
 
15
logger.debug("debug message")
 
16
logger.info("info message")
 
17
logger.warn("warn message")
 
18
logger.error("error message")
 
19
logger.critical("critical message")
 
20
 
 
21
if __name__ == "__main__":
 
22
    print "Hello World";