Configure default settings for logging:
. Go to Options -> Global Options -> Default Session
. Click on "Edit Default Settings..." -> Select "Log File"
These fields accept several variables; a complete list is shown below:
%H – hostname
%S – session name
%Y – four-digit year
%M – two-digit month
%D – two-digit day of the month
%h – two-digit hour
%m – two-digit minute
%s – two-digit seconds
%t – three-digit milliseconds
%% – percent (%)
%envvar% – environment variable (for instance %USERNAME%)