Remove duplicated code
And deprecate duplicated function.
This commit is contained in:
parent
a1b6b129aa
commit
fd831931ad
@ -30,6 +30,8 @@ import repr as repr_
|
|||||||
import decorator
|
import decorator
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
from sugar3 import env
|
||||||
|
|
||||||
# Let's keep this module self contained so that it can be easily
|
# Let's keep this module self contained so that it can be easily
|
||||||
# pasted in external sugar service like the datastore.
|
# pasted in external sugar service like the datastore.
|
||||||
|
|
||||||
@ -46,12 +48,9 @@ _LEVELS = {
|
|||||||
logging.addLevelName(TRACE, 'TRACE')
|
logging.addLevelName(TRACE, 'TRACE')
|
||||||
|
|
||||||
|
|
||||||
|
# DEPRECATED
|
||||||
def get_logs_dir():
|
def get_logs_dir():
|
||||||
profile = os.environ.get('SUGAR_PROFILE', 'default')
|
return env.get_logs_path()
|
||||||
logs_dir = os.environ.get('SUGAR_LOGS_DIR',
|
|
||||||
os.path.join(os.path.expanduser('~'),
|
|
||||||
'.sugar', profile, 'logs'))
|
|
||||||
return logs_dir
|
|
||||||
|
|
||||||
|
|
||||||
def set_level(level):
|
def set_level(level):
|
||||||
|
Loading…
Reference in New Issue
Block a user