mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Add exception logging. Closes #41
This commit is contained in:
		
							parent
							
								
									2585d97a58
								
							
						
					
					
						commit
						6a4ed2d9eb
					
				
					 2 changed files with 2 additions and 0 deletions
				
			
		|  | @ -33,6 +33,7 @@ class Kemal::Handler < HTTP::Handler | |||
|           body = route.handler.call(context).to_s | ||||
|           return HTTP::Response.new(context.status_code, body, context.response_headers) | ||||
|         rescue ex | ||||
|           Kemal::Logger::INSTANCE.write "Exception: #{ex.to_s}\n" | ||||
|           return render_500(ex.to_s) | ||||
|         end | ||||
|       end | ||||
|  |  | |||
|  | @ -1,6 +1,7 @@ | |||
| require "colorize" | ||||
| 
 | ||||
| class Kemal::Logger < HTTP::Handler | ||||
|   INSTANCE = new | ||||
|   getter handler | ||||
| 
 | ||||
|   def initialize | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue