While the current design creates a file logger in addition to the normal sys.stderr logger, the new implementation replaces it. That is, if a list of log devices is specified there would be be no sys.stderr logger by default anymore, unless it is specified (as seen in the example above)
The default behavior (i.e. not specifying any log_file / log_devices) is maintained: only sys.stderr will be created
Specifying an empty Collection, such as log_devices=[], would result in no logger (same as setting console=False)
For that reason the console argument has no use anymore. However the console argument was not removed to maintain compatibility and maybe will be used in the future for other purposes
Advantages
It is now way easier to open multiple loggers and redirect them to any file, stream or socket. This is very useful when trying to separate the emulated program output from logging output, or enable logging while fuzzing (which is currently hidden "behind" AFL box).
In the following example the logging output is redirected to another terminal pane to separate program output from logging output:
Modified logger setup to allow more flexible logging redirection and multiplexing.
Interface changes
The current interface in which
log_file
is used to optionally specify a filename to log into:Was changed into an optional variable that accepts a
Collection
of either filenames or open streams:Notes
sys.stderr
logger, the new implementation replaces it. That is, if a list of log devices is specified there would be be nosys.stderr
logger by default anymore, unless it is specified (as seen in the example above)log_file
/log_devices
) is maintained: onlysys.stderr
will be createdCollection
, such aslog_devices=[]
, would result in no logger (same as settingconsole=False
)console
argument has no use anymore. However theconsole
argument was not removed to maintain compatibility and maybe will be used in the future for other purposesAdvantages
It is now way easier to open multiple loggers and redirect them to any file, stream or socket. This is very useful when trying to separate the emulated program output from logging output, or enable logging while fuzzing (which is currently hidden "behind" AFL box).
In the following example the logging output is redirected to another terminal pane to separate program output from logging output: