You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: json.rb
    path of file: ./repos/pakyow/core/lib/pakyow/logger/formatters
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require "json"

require_relative "../../logger"
require_relative "../formatter"
require_relative "../timekeeper"

module Pakyow
  class Logger
    module Formatters
      # Formats log messages as json.
      #
      # @example
   
    
        def format_logger_message(logger_message, entry)
          logger = logger_message["logger"]
          message = logger_message["message"]

          format_entry(
            entry, id: logger.id, type: logger.type, elapsed: logger.elapsed
          )

          case message
          when Hash
            if (connection = message.delete("prologue"))
              format_prologue(connection, entry)
            elsif (connection = message.delete("epilogue"))
              format_epilogue(connection, entry)
            elsif (error = message.delete("error"))
              format_error(error, entry)
            else
              entry.update(message)
            end