You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could be fixed in LogDevice#initialize by setting the defaults outside of the if @filename condition, or repeating the logic in the LogDevice#reopen.
It would also make sense, though, if you can update the output to be able to also change those values if desired. This could be done by adding an attr_writer for them.
The best course of action would be to support adding/changing the values when a new output is specified. I'm adding a PR with my recommendation.
My specific use case involves a library I'm using instantiating a logger instance for me with STDOUT, and I want to change the output to a file with useful shift values.
The text was updated successfully, but these errors were encountered:
This code correctly sets
@shift_age
to7
and@shift_size
to1048576
This code will end up with those instance variables set to nil
This could be fixed in
LogDevice#initialize
by setting the defaults outside of theif @filename
condition, or repeating the logic in theLogDevice#reopen
.It would also make sense, though, if you can update the output to be able to also change those values if desired. This could be done by adding an
attr_writer
for them.The best course of action would be to support adding/changing the values when a new output is specified. I'm adding a PR with my recommendation.
My specific use case involves a library I'm using instantiating a logger instance for me with STDOUT, and I want to change the output to a file with useful shift values.
The text was updated successfully, but these errors were encountered: