Mercurial > libervia-web
comparison 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 |
comparison
equal
deleted
inserted
replaced
438:582c435dab6b | 439:d52f529a6d42 |
---|---|
16 | 16 |
17 # You should have received a copy of the GNU Affero General Public License | 17 # You should have received a copy of the GNU Affero General Public License |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 import pyjd # this is dummy in pyjs | 20 import pyjd # this is dummy in pyjs |
21 from sat.core.log import getLogger | |
22 log = getLogger(__name__) | |
21 from pyjamas.ui.AbsolutePanel import AbsolutePanel | 23 from pyjamas.ui.AbsolutePanel import AbsolutePanel |
22 from pyjamas.ui.VerticalPanel import VerticalPanel | 24 from pyjamas.ui.VerticalPanel import VerticalPanel |
23 from pyjamas.ui.HorizontalPanel import HorizontalPanel | 25 from pyjamas.ui.HorizontalPanel import HorizontalPanel |
24 from pyjamas.ui.HTMLPanel import HTMLPanel | 26 from pyjamas.ui.HTMLPanel import HTMLPanel |
25 from pyjamas.ui.Button import Button | 27 from pyjamas.ui.Button import Button |
65 | 67 |
66 def __init__(self, nick, state=None, special=""): | 68 def __init__(self, nick, state=None, special=""): |
67 """ | 69 """ |
68 @param nick: the user nickname | 70 @param nick: the user nickname |
69 @param state: the user chate state (XEP-0085) | 71 @param state: the user chate state (XEP-0085) |
70 @param special: a string of symbols (e.g: for activities) | 72 @param special: a string of symbols (e.g: for activities) |
71 """ | 73 """ |
72 HTML.__init__(self) | 74 HTML.__init__(self) |
73 self.nick = nick | 75 self.nick = nick |
74 self._state = state | 76 self._state = state |
75 self.special = special | 77 self.special = special |
117 | 119 |
118 def removeOccupant(self, nick): | 120 def removeOccupant(self, nick): |
119 try: | 121 try: |
120 self.remove(self.occupants_list[nick]) | 122 self.remove(self.occupants_list[nick]) |
121 except KeyError: | 123 except KeyError: |
122 print "ERROR: trying to remove an unexisting nick" | 124 log.error("trying to remove an unexisting nick") |
123 | 125 |
124 def clear(self): | 126 def clear(self): |
125 self.occupants_list.clear() | 127 self.occupants_list.clear() |
126 AbsolutePanel.clear(self) | 128 AbsolutePanel.clear(self) |
127 | 129 |