Revert "Improving log messages"

This commit is contained in:
David Négrier 2021-11-24 16:20:07 +01:00 committed by GitHub
parent 6c5f330b71
commit 6e6cdc7bde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 203 additions and 581 deletions

View file

@ -11,7 +11,6 @@ import { User } from "_Model/User";
import { variablesRepository } from "./Repository/VariablesRepository";
import { redisClient } from "./RedisClient";
import { VariableError } from "./VariableError";
import log from "./Logger";
interface Variable {
defaultValue?: string;
@ -100,7 +99,7 @@ export class VariablesManager {
for (const object of layer.objects) {
if (object.type === "variable") {
if (object.template) {
log.warn(
console.warn(
'Warning, a variable object is using a Tiled "template". WorkAdventure does not support objects generated from Tiled templates.'
);
continue;
@ -208,7 +207,7 @@ export class VariablesManager {
if (variableObject !== undefined && variableObject.persist) {
variablesRepository
.saveVariable(this.roomUrl, name, value)
.catch((e) => log.error("Error while saving variable in Redis:", e));
.catch((e) => console.error("Error while saving variable in Redis:", e));
}
return readableBy;