[PATCHv2 0/3] Share duplicated daemon code in *SetupLogging functions