<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi All,<div class=""><br class=""></div><div class="">Quick question regarding the handling of configuration changes for the disk_log hander in the new Logger framework, and specifically how it handles max_no_bytes.</div><div class=""><br class=""></div><div class="">Given a clean directory, I can do the following:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Courier New" class="">> erl</font></div><div class=""><font face="Courier New" class="">Erlang/OTP 21 [erts-10.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]</font></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class="">Eshell V10.3  (abort with ^G)</font></div><div class=""><font face="Courier New" class="">1> logger:add_handler(disk_log, logger_disk_log_h, #{config => #{file => "log/debug.log", type => wrap, max_no_files => 10, max_no_bytes => 10000}, level => all}).</font></div><div class=""><font face="Courier New" class="">ok</font></div><div class=""><font face="Courier New" class="">2>q().</font></div></div><div class=""><br class=""></div><div class="">That creates me a log folder with a debug.log.1, debug.log.idx and debug.log.siz.  If I then start a new shell and try to create the handler but with a different max_no_bytes, I get the following:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Courier New" class="">> erl</font></div><div class=""><font face="Courier New" class="">Erlang/OTP 21 [erts-10.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]</font></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class="">Eshell V10.3  (abort with ^G)</font></div><div class=""><font face="Courier New" class="">1> logger:add_handler(disk_log, logger_disk_log_h, #{config => #{file => "log/debug.log", type => wrap, max_no_files => 10, max_no_bytes => 15000}, level => all}).</font></div><div class=""><font face="Courier New" class="">{error,{handler_not_added,{size_mismatch,{10000,10},</font></div><div class=""><font face="Courier New" class="">                                         {15000,10}}}}</font></div><div class=""><font face="Courier New" class="">2> q().</font></div></div><div class=""><br class=""></div><div class="">Due to the change in the max_no_bytes parameter, the handler fails to start.  What is the recommended way to deal with adjusting config value such as this, particularly for handlers that may be added / removed dynamically?  Right now, we are needing to archive the entire log directory prior to changing values, which is a real pain.  </div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Steve</div></body></html>