error_logger_file_h

klacke@REDACTED klacke@REDACTED
Sat Feb 28 17:23:01 CET 2004


Howdy,

I think that when doing error_logger:logfile(FileName)
the file FileName shouldn't be truncated as it is now.
In principle it makes it impossible to use the function
across restarts. 

I suggest:


diff -c -r1.1.1.3 error_logger_file_h.erl
*** error_logger_file_h.erl     25 Feb 2003 08:27:23 -0000      1.1.1.3
--- error_logger_file_h.erl     28 Feb 2004 16:05:53 -0000
***************
*** 49,55 ****
  
  init(File, PrevHandler) ->
      process_flag(trap_exit, true),
!     case file:open(File, write) of
        {ok,Fd} ->
            {ok, {Fd, File, PrevHandler}};
        Error ->
--- 49,55 ----
  
  init(File, PrevHandler) ->
      process_flag(trap_exit, true),
!     case file:open(File, append) of
        {ok,Fd} ->
            {ok, {Fd, File, PrevHandler}};
        Error ->




This shouldn't break any code, and is also more intuitive.




/klacke



-- 
Claes Wikstrom                        -- Caps lock is nowhere and
http://www.hyber.org                  -- everything is under control          



More information about the erlang-patches mailing list