throw if flush failed
This commit is contained in:
		@@ -84,7 +84,10 @@ SPDLOG_INLINE void file_helper::reopen(bool truncate)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
SPDLOG_INLINE void file_helper::flush()
 | 
					SPDLOG_INLINE void file_helper::flush()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    std::fflush(fd_);
 | 
					    if(std::fflush(fd_) != 0)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        throw_spdlog_ex("Failed flush to file " + os::filename_to_str(filename_), errno);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SPDLOG_INLINE void file_helper::close()
 | 
					SPDLOG_INLINE void file_helper::close()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user