def build_context context
      # Skip if no format defined
      return unless @format[:context].is_a? Hash

      # Call the instance's method to get hash context
      return unless context.is_a? Hash

      # Build each context part
      return @format[:context].collect do |key, format|
        sprintf(format, context[key])
      end.join

    rescue KeyError, ArgumentError => ex
      return "[context: #{ex.message}]"
    end
def build_context context
      # Skip if no format defined
      return unless @format[:context].is_a? Hash

      # Call the instance's method to get hash context
      return unless context.is_a? Hash

      # Build each context part
      return @format[:context].collect do |key, format|
        sprintf(format, context[key])
      end.join

    rescue KeyError, ArgumentError => ex
      return "[context: #{ex.message}]"
    end
Builds prefix from @format[:context] and context