Bläddra i källkod

reduce log spam

master
peter 5 år sedan
förälder
incheckning
eb58ffc013

+ 3
- 1
src/backend/Admin/Admin.ts Visa fil

@@ -125,7 +125,9 @@ export class FrontworkAdmin
125 125
             }
126 126
         ], {
127 127
             errorHandler: (sock, err, rpc, args) => {
128
-                console.log(rpc, err);
128
+                console.log("RPC", rpc)
129
+                console.log("ERR", err)
130
+                console.log("ARGS", args)
129 131
             }
130 132
         })
131 133
         .attach(httpServer)

+ 1
- 1
src/backend/Components/User/UserManager.ts Visa fil

@@ -132,7 +132,7 @@ export class UserManager
132 132
     ]
133 133
 
134 134
     initialize = async () => {
135
-        this.exporters = [this, this.guild, this.item, this.raid, this.character]
135
+        this.exporters = [this.guild, this.item, this.raid, this.character]
136 136
         //set up permissions
137 137
         getLogger('UserManager#initialize').debug('setting up permissions')
138 138
 

+ 0
- 1
src/frontend/src/app/frontcraft/pages/raid/raid.component.ts Visa fil

@@ -187,7 +187,6 @@ export class FrontcraftRaidComponent
187 187
   }
188 188
 
189 189
   display = async (raiddata: RaidData) => {
190
-    this.logger.log(raiddata)
191 190
     this.isTier = allItems[raiddata.tier] != null
192 191
 
193 192
     this.raid = raiddata

+ 2
- 3
src/frontend/src/app/frontcraft/services/ApiService/client-login-api.ts Visa fil

@@ -31,7 +31,7 @@ export class ClientApiService implements IApiService{
31 31
         try{
32 32
             const sock = new RPCSocket(
33 33
                 auth.port, 
34
-                window.location.hostname
34
+                window.location.hostname,
35 35
             )
36 36
 
37 37
             sock.hook('kick', () => {
@@ -48,7 +48,7 @@ export class ClientApiService implements IApiService{
48 48
 
49 49
             sock.on('error', async (e) => {
50 50
                 this.logger.log("priv#error", e);
51
-
51
+                await this.logout()
52 52
                 //handled via unprivileged socket
53 53
             })
54 54
             const authSock = await sock.connect(auth.token.value)
@@ -95,7 +95,6 @@ export class ClientApiService implements IApiService{
95 95
             throw new Error("Login failed")
96 96
         }
97 97
 
98
-        //attach error handler now so failed logins dont trigger reloads
99 98
         this.socket.on('error', async (err) => {
100 99
             location.reload()
101 100
         })

Laddar…
Avbryt
Spara