   end
 
   def level do
-    %{level: level} = read_data!(:translation_data)
+    %{level: level} = read_data!(@data_key)
     level
   end
 

  @behaviour :gen_event
  @name __MODULE__
  @table __MODULE__
  @counter_pos 1
  @update_counter_message {__MODULE__, :update_counter}


  defp level_to_number(:error), do: 3

  def translation_data do
    read_data!(@data_key)
  end

  def log_data(level) do
    %{level: min_level} = config = read_data!(@data_key)

    if compare_levels(level, min_level) != :lt do
      %{thresholds: {counter, sync, discard}} = config
