Brought over bits from runit-logging