[Swan-dev] whack_log() or loglog(); Re: [Swan-commit] Changes to ref refs/heads/master
andrew.cagney at gmail.com
Thu Feb 20 16:18:00 UTC 2020
On Wed, 19 Feb 2020 at 14:02, Andrew Cagney <andrew.cagney at gmail.com> wrote:
> Yea, whack_log() has always been whack only. The two recent changes
> were to make the whackfd explicit, and never ever add the magic global
> Unfortunately, all the other log calls in mainline still pick up the
> global whack_log_fd.
I added loglog_global(RC, WHACKFD, MESSAGE,...) which means there are
- log to whack only: whack_log(RC, WHACKFD, MESSAGE, ...) - for
intance 'ipsec show'
- log to file only: plog_global(MESSAGE, ...) - for instance in a
global timer event handler that has no whack
- log to whack and file: loglog_global(RC, WHACKFD, MESSAGE,...) - for
instance the above
we could combine plog_global() into loglog_global() and adopt a
convention such as:
loglog_global(0/*RC*/, NULL/*WHACKFD*/, ...)
when there is no whack. whack_log() is something of an outlier.
However, I'm not in a hurry. Just eliminating whack_log_fd will be an
More information about the Swan-dev