Mercurial > libervia-web
diff browser_side/base_panels.py @ 439:d52f529a6d42
browser side: use of new log system (first draft):
- configuration is hardcoded in libervia.py, it will change in the (hopefuly) near future
- log level is DEBUG for the moment, will be changed to INFO when configuration will not be hardcoded anymore
- the basic log backend is used, in the future, a console.debug/info/etc should be used instead. A log widget which HTML colors is also an option
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 08 May 2014 17:21:34 +0200 |
parents | bbdbee25123a |
children |
line wrap: on
line diff
--- a/browser_side/base_panels.py Thu May 08 17:21:30 2014 +0200 +++ b/browser_side/base_panels.py Thu May 08 17:21:34 2014 +0200 @@ -18,6 +18,8 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import pyjd # this is dummy in pyjs +from sat.core.log import getLogger +log = getLogger(__name__) from pyjamas.ui.AbsolutePanel import AbsolutePanel from pyjamas.ui.VerticalPanel import VerticalPanel from pyjamas.ui.HorizontalPanel import HorizontalPanel @@ -67,7 +69,7 @@ """ @param nick: the user nickname @param state: the user chate state (XEP-0085) - @param special: a string of symbols (e.g: for activities) + @param special: a string of symbols (e.g: for activities) """ HTML.__init__(self) self.nick = nick @@ -119,7 +121,7 @@ try: self.remove(self.occupants_list[nick]) except KeyError: - print "ERROR: trying to remove an unexisting nick" + log.error("trying to remove an unexisting nick") def clear(self): self.occupants_list.clear()