guma44 / GEOparse

Python library to access Gene Expression Omnibus Database (GEO)
BSD 3-Clause "New" or "Revised" License
137 stars 51 forks source link

GEOparse.logger.set_verbosity doesn't work #47

Closed Miserlou closed 5 years ago

Miserlou commented 6 years ago

The docs mention there is a

GEOparse.logger.set_verbosity('ERROR')

however, this causes: AttributeError: 'Logger' object has no attribute 'set_verbosity'

This can be side-stepped with:

import logging
GEOparse.logger.setLevel(logging.getLevelName("ERROR"))
guma44 commented 6 years ago

Your right. The name is used twice :/. There is a workaround for this. In principle I wrote the logger not to be imported ie. logger module exposes set_verbosity function that should be used from GEOparse module directly ie:

import GEOparse
GEOparse.set_verbosity("ERROR")

This should work.

guma44 commented 6 years ago

GEOparse.logger.set_verbosity doesn't work