module WolfCore::LoggingUtils

def log_object(object, title: nil)

def log_object(object, title: nil)
  puts '---------------------------------'
  puts title if title
  case object
  when Hash, Array, OpenStruct, Result
    if object.instance_of?(OpenStruct) || object.instance_of?(Result)
      object = object.to_h
    end
    puts object.to_json
  when Object
    pp object
  else
    puts object
  end
end