Implement logger on back

This commit is contained in:
Alexis Faizeau 2021-11-08 17:44:44 +01:00
parent c573e9fbaf
commit 6a195be814
17 changed files with 260 additions and 76 deletions

View file

@ -5,6 +5,7 @@ import { promisify } from "util";
import { LocalUrlError } from "./LocalUrlError";
import { ITiledMap } from "@workadventure/tiled-map-type-guard";
import { isTiledMap } from "@workadventure/tiled-map-type-guard/dist";
import log from "./Logger";
class MapFetcher {
async fetchMap(mapUrl: string): Promise<ITiledMap> {
@ -29,7 +30,7 @@ class MapFetcher {
if (!isTiledMap(res.data)) {
//TODO fixme
//throw new Error("Invalid map format for map " + mapUrl);
console.error("Invalid map format for map " + mapUrl);
log.error("Invalid map format for map " + mapUrl);
}
return res.data;