diff options
author | Stan Seibert <stan@mtrr.org> | 2011-10-03 10:08:08 -0400 |
---|---|---|
committer | Stan Seibert <stan@mtrr.org> | 2011-10-03 10:08:08 -0400 |
commit | 5bc1516d020cd5b304d0364b74b65d6f3239809c (patch) | |
tree | d1557cf6a99ae5bf4ba15cb9c26847c5fef078c4 /bin/chroma-sim | |
parent | f546e2ee29db8c62112e9370c9a51947e6f87da1 (diff) | |
download | chroma-5bc1516d020cd5b304d0364b74b65d6f3239809c.tar.gz chroma-5bc1516d020cd5b304d0364b74b65d6f3239809c.tar.bz2 chroma-5bc1516d020cd5b304d0364b74b65d6f3239809c.zip |
Create a chroma.log module that provides the default logger object for
the package.
Rather than use the logging module directly, we wrap it with this to ensure
that logger.basicConfig() is called automatically. All chroma code
should use this logger for printing status information so that it can
be hidden when chroma is part of a bigger application.
Diffstat (limited to 'bin/chroma-sim')
-rwxr-xr-x | bin/chroma-sim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/chroma-sim b/bin/chroma-sim index 0d737c4..7f309de 100755 --- a/bin/chroma-sim +++ b/bin/chroma-sim @@ -16,6 +16,10 @@ if __name__ == '__main__': from chroma.rootimport import ROOT ROOT.gROOT.SetBatch() + from chroma.log import logger, logging + logger.setLevel(logging.INFO) + + parser = optparse.OptionParser('%prog <detector>') parser.add_option('-o', dest='output_filename', help='output filename', default='out.root') |