[IMP]Hy base : add Odoo debug logger
This commit is contained in:
parent
f6b892efd4
commit
d0a7b6a74e
@ -17,7 +17,8 @@
|
||||
|
||||
" Odoo XML macros "
|
||||
|
||||
(import [odoo.addons.hy_base.xml [*]])
|
||||
(import logging [odoo.addons.hy_base.xml [*]])
|
||||
(setv logger (.getLogger logging __name__))
|
||||
|
||||
(defmacro if-python2 [python2-form python3-form]
|
||||
"If running on python2, execute python2-form, else, execute python3-form"
|
||||
@ -92,4 +93,5 @@
|
||||
(setv ~g!output-xml (.decode (.tostring ET ~tree) "utf-8")))
|
||||
(setv ~g!output-path (.dirname path (.abspath path __file__))
|
||||
~g!fpath (+ ~g!output-path "/" ~filename))
|
||||
(with [f (open ~g!fpath "w")] (.write f ~g!output-xml))))
|
||||
(.debug logger (+ "Hy XML DSL : compiling " ~filename " to " ~g!output-path))
|
||||
(with [f (open ~g!fpath "w")] (.write f ~g!output-xml))))
|
||||
|
Loading…
Reference in New Issue
Block a user