Changeset 399 for binary-improvements2/WebServer/src/UrlHandlers
- Timestamp:
- Aug 14, 2022, 8:13:05 PM (2 years ago)
- Location:
- binary-improvements2/WebServer/src/UrlHandlers
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/WebServer/src/UrlHandlers/ApiHandler.cs
r394 r399 64 64 65 65 if (!apis.TryGetValue (apiName, out AbsWebAPI api)) { 66 Log. Out ($"Error in {nameof(ApiHandler)}.HandleRequest(): No handler found for API \"{apiName}\"");66 Log.Warning ($"[Web] In {nameof(ApiHandler)}.HandleRequest(): No handler found for API \"{apiName}\""); 67 67 _context.Response.StatusCode = (int) HttpStatusCode.NotFound; 68 68 return; … … 85 85 apiHandlerSampler.End (); 86 86 } catch (Exception e) { 87 Log.Error ($" Error in {nameof(ApiHandler)}.HandleRequest(): Handler {api.Name} threw an exception:");87 Log.Error ($"[Web] In {nameof(ApiHandler)}.HandleRequest(): Handler {api.Name} threw an exception:"); 88 88 Log.Exception (e); 89 89 _context.Response.StatusCode = (int) HttpStatusCode.InternalServerError; -
binary-improvements2/WebServer/src/UrlHandlers/ItemIconHandler.cs
r391 r399 28 28 if (!loaded) { 29 29 _context.Response.StatusCode = (int) HttpStatusCode.InternalServerError; 30 Log.Out (" Web:IconHandler: Icons not loaded");30 Log.Out ("[Web] IconHandler: Icons not loaded"); 31 31 return; 32 32 } … … 45 45 _context.Response.StatusCode = (int) HttpStatusCode.NotFound; 46 46 if (logMissingFiles) { 47 Log.Out (" Web:IconHandler:FileNotFound: \"" + _context.RequestPath + "\" ");47 Log.Out ("[Web] IconHandler: FileNotFound: \"" + _context.RequestPath + "\" "); 48 48 } 49 49 } … … 83 83 loadIconsFromFolder (GameIO.GetGameDir ("Data/ItemIcons"), tintedIcons); 84 84 } catch (Exception e) { 85 Log.Error (" Failed loading icons from base game");85 Log.Error ("[Web] Failed loading icons from base game"); 86 86 Log.Exception (e); 87 87 } … … 93 93 loadIconsFromFolder (modIconsPath, tintedIcons); 94 94 } catch (Exception e) { 95 Log.Error (" Failed loading icons from mod " + mod.ModInfo.Name.Value);95 Log.Error ("[Web] Failed loading icons from mod " + mod.ModInfo.Name.Value); 96 96 Log.Exception (e); 97 97 } … … 99 99 100 100 loaded = true; 101 Log.Out (" Web:IconHandler: Icons loaded - {0} ms", microStopwatch.ElapsedMilliseconds);101 Log.Out ("[Web] IconHandler: Icons loaded - {0} ms", microStopwatch.ElapsedMilliseconds); 102 102 103 103 return true; -
binary-improvements2/WebServer/src/UrlHandlers/SessionHandler.cs
r394 r399 70 70 WebConnection con = connectionHandler.LogIn (id, _context.Request.RemoteEndPoint.Address); 71 71 int level = GameManager.Instance.adminTools.GetUserPermissionLevel (con.UserId); 72 Log.Out (" Steam OpenID login from {0} with ID {1}, permission level {2}",72 Log.Out ("[Web] Steam OpenID login from {0} with ID {1}, permission level {2}", 73 73 remoteEndpointString, con.UserId, level); 74 74 … … 85 85 } 86 86 } catch (Exception e) { 87 Log.Error (" Error validatinglogin:");87 Log.Error ("[Web] Error validating Steam login:"); 88 88 Log.Exception (e); 89 89 } 90 90 91 Log.Out ($" Steam OpenID login failed from {remoteEndpointString}");91 Log.Out ($"[Web] Steam OpenID login failed from {remoteEndpointString}"); 92 92 _context.Response.Redirect (pageErrorPath + "SteamLoginFailed"); 93 93 } -
binary-improvements2/WebServer/src/UrlHandlers/SseHandler.cs
r391 r399 58 58 59 59 if (!events.TryGetValue (eventName, out AbsEvent eventInstance)) { 60 Log. Out ($"Error in {nameof (SseHandler)}.HandleRequest(): No handler found for event \"{eventName}\"");60 Log.Warning ($"[Web] [SSE] In {nameof (SseHandler)}.HandleRequest(): No handler found for event \"{eventName}\""); 61 61 _context.Response.StatusCode = (int)HttpStatusCode.NotFound; 62 62 return; … … 81 81 _context.Response.OutputStream.Flush (); 82 82 } catch (Exception e) { 83 Log.Error ($" Error in {nameof (SseHandler)}.HandleRequest(): Handler {eventInstance.Name} threw an exception:");83 Log.Error ($"[Web] [SSE] In {nameof (SseHandler)}.HandleRequest(): Handler {eventInstance.Name} threw an exception:"); 84 84 Log.Exception (e); 85 85 _context.Response.StatusCode = (int)HttpStatusCode.InternalServerError; … … 99 99 eventHandler.ProcessSendQueue (); 100 100 } catch (Exception e) { 101 Log.Error ($" SSE ({eventName}): Error processing send queue");101 Log.Error ($"[Web] [SSE] '{eventName}': Error processing send queue"); 102 102 Log.Exception (e); 103 103 } -
binary-improvements2/WebServer/src/UrlHandlers/StaticHandler.cs
r391 r399 28 28 _context.Response.StatusCode = (int) HttpStatusCode.NotFound; 29 29 if (logMissingFiles) { 30 Log. Out ("Web:Static:FileNotFound: \"" + _context.RequestPath + "\" @ \"" + datapath + fn + "\"");30 Log.Warning ("[Web] Static: FileNotFound: \"" + _context.RequestPath + "\" @ \"" + datapath + fn + "\""); 31 31 } 32 32 }
Note:
See TracChangeset
for help on using the changeset viewer.