mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
Choosing only one style of capitalization Add extra space after some commas too Remove idle spaces (Bitbake rev: daad17bccec8cb98ef2fca4262641167500bd46e) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Cc: Joshua Watt <JPEWhacker@gmail.com> Cc: Tim Orling <ticotimo@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
21 lines
503 B
Python
21 lines
503 B
Python
#
|
|
# Copyright BitBake Contributors
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
|
|
__version__ = "1.0.0"
|
|
|
|
import os, time
|
|
import sys, logging
|
|
|
|
def init_logger(logfile, loglevel):
|
|
numeric_level = getattr(logging, loglevel.upper(), None)
|
|
if not isinstance(numeric_level, int):
|
|
raise ValueError("Invalid log level: %s" % loglevel)
|
|
FORMAT = "%(asctime)-15s %(message)s"
|
|
logging.basicConfig(level=numeric_level, filename=logfile, format=FORMAT)
|
|
|
|
class NotFoundError(Exception):
|
|
pass
|