mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Created logger
This commit is contained in:
		
							parent
							
								
									3c4619e040
								
							
						
					
					
						commit
						be58e009af
					
				
					 2 changed files with 24 additions and 0 deletions
				
			
		
							
								
								
									
										11
									
								
								src/kemal/logger.cr
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/kemal/logger.cr
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
class Kemal::Logger
 | 
			
		||||
  LOG_LEVELS = %w(info debug error warn)
 | 
			
		||||
  def initialize(@stream)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  {% for method in LOG_LEVELS %}
 | 
			
		||||
    def {{method.id}}(message)
 | 
			
		||||
      @stream.puts message
 | 
			
		||||
    end
 | 
			
		||||
  {% end %}
 | 
			
		||||
end
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue