The ZOOM ErrorLogger Package:

Trap to Avoid When Changing ostreams for an ELoutput

If you change the ostream associated with an ELoutput destination, you need to be careful to avoid this ways of shooting yourself in the foot:

Leaving two active handles to the same file

If you use the same signature for changing the ostream as was used for constructing the ELoutput (either both by suppling a std::ostream or both by supplying a string to use as a file name) then you cannot get into trouble. In particular, changing from one file to the identical file will work fine: The file will be closed, then re-opened for appending.