mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Add flush on newline Fixes #15
This commit is contained in:
		
							parent
							
								
									173bbf7639
								
							
						
					
					
						commit
						9cb3cafa62
					
				
					 2 changed files with 5 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -4,7 +4,9 @@ class Kemal::Logger < HTTP::Handler
 | 
			
		|||
  def initialize
 | 
			
		||||
    @env = Kemal.config.env
 | 
			
		||||
    @handler = if @env == "production"
 | 
			
		||||
                 File.new("kemal.log", "a")
 | 
			
		||||
                 handler = File.new("kemal.log", "a")
 | 
			
		||||
                 handler.flush_on_newline = true
 | 
			
		||||
                 handler
 | 
			
		||||
               else
 | 
			
		||||
                 STDOUT
 | 
			
		||||
               end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue