Skip to content

Commit

Permalink
Add logging level argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Phlya committed Mar 22, 2019
1 parent e633036 commit f041ce4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions coolpup.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,15 @@ def pileupsByWindowWithControl(mids, filename, pad=100, nproc=1, chroms=None,
help="""Name of the output file. If not set, is
generated automatically to include important
information.""")
parser.add_argument("-l", "--log", dest="logLevel",
choices=['DEBUG', 'INFO', 'WARNING',
'ERROR', 'CRITICAL'],
default='INFO',
help="Set the logging level.")
args = parser.parse_args()

logging.basicConfig(level=getattr(logging, args.logLevel))

logging.info(args)
if args.n_proc==0:
nproc=-1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='coolpuppy',
version='0.8',
version='0.8.1',
scripts=['coolpup.py'],
install_requires=['numpy', 'cooler', 'pandas', 'natsort', 'scipy',
'cooltools'],
Expand Down

0 comments on commit f041ce4

Please sign in to comment.