Show More
@@ -497,3 +497,11 b' def fix_PATH(os_=None):' | |||
|
497 | 497 | cur_path = os.path.split(sys.executable)[0] |
|
498 | 498 | if not os.environ['PATH'].startswith(cur_path): |
|
499 | 499 | os.environ['PATH'] = '%s:%s' % (cur_path, os.environ['PATH']) |
|
500 | ||
|
501 | ||
|
502 | def obfuscate_url_pw(engine): | |
|
503 | from sqlalchemy.engine import url | |
|
504 | url = url.make_url(engine) | |
|
505 | if url.password: | |
|
506 | url.password = 'XXXXX' | |
|
507 | return str(url) No newline at end of file |
@@ -43,7 +43,7 b'' | |||
|
43 | 43 | |
|
44 | 44 | import logging |
|
45 | 45 | from rhodecode.model import meta |
|
46 | from rhodecode.lib.utils2 import safe_str | |
|
46 | from rhodecode.lib.utils2 import safe_str, obfuscate_url_pw | |
|
47 | 47 | |
|
48 | 48 | log = logging.getLogger(__name__) |
|
49 | 49 | |
@@ -56,7 +56,8 b' def init_model(engine):' | |||
|
56 | 56 | |
|
57 | 57 | :param engine: engine to bind to |
|
58 | 58 | """ |
|
59 | log.info("initializing db for %s" % engine) | |
|
59 | engine_str = obfuscate_url_pw(str(engine.url)) | |
|
60 | log.info("initializing db for %s" % engine_str) | |
|
60 | 61 | meta.Base.metadata.bind = engine |
|
61 | 62 | |
|
62 | 63 |
General Comments 0
You need to be logged in to leave comments.
Login now