mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-17 13:13:18 +00:00
Fix circular import problem
The change to allow configmanager to log traces erroneously broke due to use of 'import .. as' in circular imports. Skip 'as' and the problem does not occur.
This commit is contained in:
parent
14ce9970ad
commit
a366520670
@ -65,7 +65,7 @@ import anydbm as dbm
|
||||
import ast
|
||||
import base64
|
||||
import confluent.config.attributes as allattributes
|
||||
import confluent.log as log
|
||||
import confluent.log
|
||||
import confluent.util
|
||||
import copy
|
||||
import cPickle
|
||||
@ -925,7 +925,7 @@ class ConfigManager(object):
|
||||
except Exception:
|
||||
global tracelog
|
||||
if tracelog is None:
|
||||
tracelog = log.Logger('trace')
|
||||
tracelog = confluent.log.Logger('trace')
|
||||
tracelog.log(traceback.format_exc(), ltype=log.DataTypes.event,
|
||||
event=log.Events.stacktrace)
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
||||
# or other fields)
|
||||
|
||||
import collections
|
||||
import confluent.config.configmanager as configuration
|
||||
import confluent.config.configmanager
|
||||
import eventlet
|
||||
import fcntl
|
||||
import json
|
||||
@ -120,7 +120,7 @@ class Logger(object):
|
||||
# we are just a copy of the same object
|
||||
return
|
||||
self.initialized = True
|
||||
self.filepath = configuration.get_global("logdirectory")
|
||||
self.filepath = confluent.config.configmanager.get_global("logdirectory")
|
||||
if self.filepath is None:
|
||||
self.filepath = "/var/log/confluent/"
|
||||
self.isconsole = console
|
||||
|
Loading…
x
Reference in New Issue
Block a user