From 8202acc939ccdd3c3db5b5a33f467ea3a26d6dd8 Mon Sep 17 00:00:00 2001 From: Susumu Yamazaki Date: Thu, 2 Apr 2020 15:43:13 +0900 Subject: [PATCH] replace @log_path and @compile_time_info --- lib/pelemay.ex | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/pelemay.ex b/lib/pelemay.ex index cec1006..eec4fc8 100644 --- a/lib/pelemay.ex +++ b/lib/pelemay.ex @@ -54,9 +54,11 @@ defmodule Pelemay do """ defmacro defpelemay(functions) do Logger.add_backend(Pelemay.Logger) - Logger.configure_backend(Pelemay.Logger, path: @log_path) + log_path = Application.app_dir(:pelemay, "priv/info.log") + Logger.configure_backend(Pelemay.Logger, path: log_path) - File.write!(@compile_time_info, "compile_time_info = #{CpuInfo.all_profile() |> inspect()}") + Application.app_dir(:pelemay, "priv/compile_time_info") + |> File.write!("compile_time_info = #{CpuInfo.all_profile() |> inspect()}") Db.init()