same behavior in lager_file_backend, not sure this is mean to.
if not seems just change laget_util:expand_path from rel path to abs will resolve this,if this is fine,i could make a pr for this.
if mean to, maybe add a env key like use_abs_path or abs_log_root let config control is a way too
with env
after call
cd("log").
crash log will make new file in ./log/log/crash.log not continue write in ./log/crash.log seems because when ensure log file,use rel file name,and rel file changed because of pwd changed https://github.com/erlang-lager/lager/blob/91575d4479c897451edf138c10fa86c3125ec52e/src/lager_util.erl#L601-L604 then will create new log file https://github.com/erlang-lager/lager/blob/91575d4479c897451edf138c10fa86c3125ec52e/src/lager_rotator_default.erl#L44-L47same behavior in lager_file_backend, not sure this is mean to. if not seems just change laget_util:expand_path from rel path to abs will resolve this,if this is fine,i could make a pr for this.
if mean to, maybe add a env key like
use_abs_path
orabs_log_root
let config control is a way too