瀏覽代碼

reduce log spam

master
peter 5 年之前
父節點
當前提交
eb58ffc013

+ 3
- 1
src/backend/Admin/Admin.ts 查看文件

125
             }
125
             }
126
         ], {
126
         ], {
127
             errorHandler: (sock, err, rpc, args) => {
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
         .attach(httpServer)
133
         .attach(httpServer)

+ 1
- 1
src/backend/Components/User/UserManager.ts 查看文件

132
     ]
132
     ]
133
 
133
 
134
     initialize = async () => {
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
         //set up permissions
136
         //set up permissions
137
         getLogger('UserManager#initialize').debug('setting up permissions')
137
         getLogger('UserManager#initialize').debug('setting up permissions')
138
 
138
 

+ 0
- 1
src/frontend/src/app/frontcraft/pages/raid/raid.component.ts 查看文件

187
   }
187
   }
188
 
188
 
189
   display = async (raiddata: RaidData) => {
189
   display = async (raiddata: RaidData) => {
190
-    this.logger.log(raiddata)
191
     this.isTier = allItems[raiddata.tier] != null
190
     this.isTier = allItems[raiddata.tier] != null
192
 
191
 
193
     this.raid = raiddata
192
     this.raid = raiddata

+ 2
- 3
src/frontend/src/app/frontcraft/services/ApiService/client-login-api.ts 查看文件

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

Loading…
取消
儲存