diff browser_side/file_tools.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 462fc3359ee3
children
line wrap: on
line diff
--- a/browser_side/file_tools.py	Thu May 08 17:21:30 2014 +0200
+++ b/browser_side/file_tools.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.FileUpload import FileUpload
 from pyjamas.ui.FormPanel import FormPanel
 from pyjamas import Window
@@ -123,7 +125,7 @@
         if self.close_cb:
             self.close_cb()
         else:
-            print ("WARNING: no close method defined")
+            log.warning("no close method defined")
 
     def onSubmitBtnClick(self):
         if not self.file_upload.check():