HEX
Server: nginx/1.22.0
System: Linux iZuf6jdxbygmf6cco977lcZ 5.10.84-10.4.al8.x86_64 #1 SMP Tue Apr 12 12:31:07 CST 2022 x86_64
User: root (0)
PHP: 7.4.29
Disabled: passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_restore,dl,readlink,symlink,popepassthru,stream_socket_server,fsocket,popen
Upload Files
File: //lib/python3.6/site-packages/cloudinit/cmd/devel/__init__.py
# This file is part of cloud-init. See LICENSE file for license information.

"""Common cloud-init devel commandline utility functions."""


import logging

from cloudinit import log
from cloudinit.stages import Init


def addLogHandlerCLI(logger, log_level):
    """Add a commandline logging handler to emit messages to stderr."""
    formatter = logging.Formatter('%(levelname)s: %(message)s')
    log.setupBasicLogging(log_level, formatter=formatter)
    return logger


def read_cfg_paths():
    """Return a Paths object based on the system configuration on disk."""
    init = Init(ds_deps=[])
    init.read_cfg()
    return init.paths

# vi: ts=4 expandtab