public static function log(...$args)
    {
        if (sizeof($args) === 1) {
            $msg = is_scalar($args[0]) ? $args[0] : Debug::dump($args[0]);
        } else {
            $msg = Debug::dump($args);
        }

        $mt = explode(' ', microtime());

        if (is_resource(STDERR)) {
            fwrite(STDERR, '[PHPD] ' . $msg . "\n");
        }

        $msg = str_replace("\x01", $msg, date(strtr(Daemon::$config->logformat->value,
                ['%msg%' => "\x01", '\\u' => '\\u', 'u' => sprintf('%06d', $mt[0] * 1000000)]))) . "\n";

        if (Daemon::$logpointerAsync) {
            Daemon::$logpointerAsync->write($msg);
        } elseif (Daemon::$logpointer) {
            fwrite(Daemon::$logpointer, $msg);
        }
    }