diff --git a/lib/semlogr/logger.rb b/lib/semlogr/logger.rb
index <HASH>..<HASH> 100644
--- a/lib/semlogr/logger.rb
+++ b/lib/semlogr/logger.rb
@@ -76,11 +76,11 @@ module Semlogr
       return true if @sinks.size.zero?
       return true if severity < @min_severity
 
-      if template.nil? && block
+      if block
         template, properties = yield
 
         properties ||= {}
-        error = properties[:error]
+        error = properties.delete(:error)
       end
 
       log_event = create_log_event(severity, template, error, properties)
Handle progname based logging, initially this is not outputting the progname anywhere and this might come later.