Mercurial > libervia-web
diff browser_side/dialog.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 | 6e38d317bc16 |
children |
line wrap: on
line diff
--- a/browser_side/dialog.py Thu May 08 17:21:30 2014 +0200 +++ b/browser_side/dialog.py Thu May 08 17:21:34 2014 +0200 @@ -17,6 +17,8 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +from sat.core.log import getLogger +log = getLogger(__name__) from pyjamas.ui.VerticalPanel import VerticalPanel from pyjamas.ui.Grid import Grid from pyjamas.ui.HorizontalPanel import HorizontalPanel @@ -117,9 +119,9 @@ elif nb_contact is not None: nb_contact = (nb_contact, nb_contact) if nb_contact is None: - print "Need to select as many contacts as you want" + log.warning("Need to select as many contacts as you want") else: - print "Need to select between %d and %d contacts" % nb_contact + log.warning("Need to select between %d and %d contacts" % nb_contact) self.nb_contact = nb_contact self.ok_button = ok_button VerticalPanel.__init__(self, Width='100%')