Showing 3 changed files with 11 additions and 11 deletions
+4 -4
Nasal/display.nas
... ...
@@ -304,7 +304,7 @@ var displayClass = {
304 304
                 if (contains(me.clips, e))
305 305
                     me.screenElements[e].set("clip", me.clips[e]);
306 306
                 else
307
-                    printlog('warn', 'no defined clip for ' ~ e);
307
+                    logprint(LOG_WARN, 'no defined clip for ' ~ e);
308 308
             }
309 309
             elsif (t == 'text') {
310 310
                 if (contains(me.texts, e)) {
... ...
@@ -318,10 +318,10 @@ var displayClass = {
318 318
                         me.screenElements[e].setVisible(me.texts[e].visible);
319 319
                 }
320 320
                 else
321
-                    printlog('debug', 'no text format for ' ~ e);
321
+                    logprint(LOG_DEBUG, 'no text format for ' ~ e);
322 322
             }
323 323
             else
324
-                printlog('warn', 'unknown method ' ~ t);
324
+                logprint(LOG_WARN, 'unknown method ' ~ t);
325 325
         };
326 326
         foreach (var todo; keys(h)) {
327 327
             if (typeof(h[todo]) != 'vector') h[todo] = [ h[todo] ];
... ...
@@ -331,7 +331,7 @@ var displayClass = {
331 331
                     if (me.screenElements[id] != nil)
332 332
                         setMethod(id, todo);
333 333
                     else
334
-                        printlog('warn', 'SVG ID ' ~ id ~ ' not found');
334
+                        logprint(LOG_WARN, 'SVG ID ' ~ id ~ ' not found');
335 335
                 }
336 336
                 else
337 337
                     setMethod(id, todo);
+5 -5
Nasal/maps/tiles.nas
... ...
@@ -89,18 +89,18 @@ var MapTiles = {
89 89
 
90 90
                     (func {
91 91
                         var img_path = me.makePath(pos);
92
-                        printlog('debug', 'img_path: ', img_path);
92
+                        logprint(LOG_DEBUG, 'img_path: ', img_path);
93 93
                         var tile = me.tiles[x][y];
94 94
 
95 95
                         if (io.stat(img_path) == nil) { # image not found, save in $FG_HOME
96 96
                             var img_url = me.makeUrl(pos);
97
-                            printlog('debug', 'requesting ' ~ img_url);
97
+                            logprint(LOG_DEBUG, 'requesting ' ~ img_url);
98 98
                             http.save(img_url, img_path)
99
-                                .done(func {printlog('info', 'received image ' ~ img_path); tile.set("src", img_path);})
100
-                                .fail(func (r) printlog('warn', 'Failed to get image ' ~ img_path ~ ' ' ~ r.status ~ ': ' ~ r.reason));
99
+                                .done(func {logprint(LOG_INFO, 'received image ' ~ img_path); tile.set("src", img_path);})
100
+                                .fail(func (r) logprint(LOG_WARN, 'Failed to get image ' ~ img_path ~ ' ' ~ r.status ~ ': ' ~ r.reason));
101 101
                         }
102 102
                         else { # cached image found, reusing
103
-                            printlog('debug', 'loading ' ~ img_path);
103
+                            logprint(LOG_DEBUG, 'loading ' ~ img_path);
104 104
                             tile.set("src", img_path);
105 105
                         }
106 106
                     })();
+2 -2
Nasal/menu.nas
... ...
@@ -165,11 +165,11 @@ var pageClass = {
165 165
     
166 166
     draw : func (id, geometry, objects, scroll = nil) {
167 167
         if (contains(me.window, id ~ '-bg')) {
168
-            printlog('debug', 'objet ' ~ id ~ ' already exists');
168
+            logprint(LOG_DEBUG, 'objet ' ~ id ~ ' already exists');
169 169
             return;
170 170
         }
171 171
         if (!contains(geometry, 'h') and !contains(geometry, 'l')) {
172
-            printlog('debug', 'missing parameter l or h');
172
+            logprint(LOG_DEBUG, 'missing parameter l or h');
173 173
             return;
174 174
         }
175 175
         var save_x = geometry.x;