Revert "Improving log messages"
This commit is contained in:
parent
6c5f330b71
commit
6e6cdc7bde
38 changed files with 203 additions and 581 deletions
|
@ -27,7 +27,6 @@ import { ADMIN_API_URL } from "../Enum/EnvironmentVariable";
|
|||
import { LocalUrlError } from "../Services/LocalUrlError";
|
||||
import { emitErrorOnRoomSocket } from "../Services/MessageHelpers";
|
||||
import { VariableError } from "../Services/VariableError";
|
||||
import log from "../Services/Logger";
|
||||
|
||||
export type ConnectCallback = (user: User, group: Group) => void;
|
||||
export type DisconnectCallback = (user: User, group: Group) => void;
|
||||
|
@ -153,7 +152,7 @@ export class GameRoom {
|
|||
public leave(user: User) {
|
||||
const userObj = this.users.get(user.id);
|
||||
if (userObj === undefined) {
|
||||
log.warn("User ", user.id, "does not belong to this game room! It should!");
|
||||
console.warn("User ", user.id, "does not belong to this game room! It should!");
|
||||
}
|
||||
if (userObj !== undefined && typeof userObj.group !== "undefined") {
|
||||
this.leaveGroup(userObj);
|
||||
|
@ -445,7 +444,7 @@ export class GameRoom {
|
|||
|
||||
const match = /\/_\/[^/]+\/(.+)/.exec(roomUrlObj.pathname);
|
||||
if (!match) {
|
||||
log.error("Unexpected room URL", roomUrl);
|
||||
console.error("Unexpected room URL", roomUrl);
|
||||
throw new Error('Unexpected room URL "' + roomUrl + '"');
|
||||
}
|
||||
|
||||
|
@ -461,7 +460,7 @@ export class GameRoom {
|
|||
|
||||
const result = await adminApi.fetchMapDetails(roomUrl);
|
||||
if (!isMapDetailsData(result)) {
|
||||
log.error("Unexpected room details received from server", result);
|
||||
console.error("Unexpected room details received from server", result);
|
||||
throw new Error("Unexpected room details received from server");
|
||||
}
|
||||
return result;
|
||||
|
@ -520,9 +519,7 @@ export class GameRoom {
|
|||
for (const roomListener of this.roomListeners) {
|
||||
emitErrorOnRoomSocket(
|
||||
roomListener,
|
||||
"Your map '" +
|
||||
this.mapUrl +
|
||||
"' does not seem accessible from the WorkAdventure servers. Is it behind a firewall or a proxy? Your map should be accessible from the WorkAdventure servers. If you use the scripting API in this map, please be aware that server-side checks and variable persistence is disabled."
|
||||
"Your map does not seem accessible from the WorkAdventure servers. Is it behind a firewall or a proxy? Your map should be accessible from the WorkAdventure servers. If you use the scripting API in this map, please be aware that server-side checks and variable persistence is disabled."
|
||||
);
|
||||
}
|
||||
}, 1000);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue