diff options
author | Fathi Boudra <fathi.boudra@linaro.org> | 2012-10-20 09:17:46 +0300 |
---|---|---|
committer | Fathi Boudra <fathi.boudra@linaro.org> | 2012-10-20 09:17:46 +0300 |
commit | fa407e3065ae0e54232b9f719d9db86c3a67c040 (patch) | |
tree | 35d94ed32fcf2496a1f760556e616a80dd1b2f9a /linaro_image_tools/media_create/boards.py | |
parent | b21d6e2ac0a693009abca7ecff545572156f3fe1 (diff) |
Revert the use of common logging infrastructure.
Diffstat (limited to 'linaro_image_tools/media_create/boards.py')
-rw-r--r-- | linaro_image_tools/media_create/boards.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/linaro_image_tools/media_create/boards.py b/linaro_image_tools/media_create/boards.py index ff939e0..5e70357 100644 --- a/linaro_image_tools/media_create/boards.py +++ b/linaro_image_tools/media_create/boards.py @@ -47,8 +47,6 @@ from linaro_image_tools.media_create.partitions import ( partition_mounted, SECTOR_SIZE, register_loopback) from StringIO import StringIO -logger = logging.getLogger(__name__) - KERNEL_GLOB = 'vmlinuz-*-%(kernel_flavor)s' INITRD_GLOB = 'initrd.img-*-%(kernel_flavor)s' DTB_GLOB = 'dt-*-%(kernel_flavor)s/%(dtb_name)s' @@ -459,6 +457,14 @@ class BoardConfig(object): hardwarepack_handler = None + @staticmethod + def _get_logger(): + """ + Gets the logger instance. + :return: The logger instance + """ + return logging.getLogger('linaro_image_tools') + @classmethod def get_metadata_field(cls, field_name): """ Return the metadata value for field_name if it can be found. @@ -871,6 +877,7 @@ class BoardConfig(object): :param dest_dir: The directory where to copy each dtb file. :param search_dir: The directory where to search for the real file. """ + logger = logging.getLogger("linaro_image_tools") logger.info("Copying dtb files") for dtb_file in dtb_files: if dtb_file: @@ -915,6 +922,7 @@ class BoardConfig(object): if max_size is not None: assert os.path.getsize(from_file) <= max_size, ( "'%s' is larger than %s" % (from_file, max_size)) + logger = logging.getLogger("linaro_image_tools") logger.info("Writing '%s' to '%s' at %s." % (from_file, to_file, seek)) _dd(from_file, to_file, seek=seek) @@ -937,6 +945,7 @@ class BoardConfig(object): if cls.spl_in_boot_part: assert spl_file is not None, ( "SPL binary could not be found") + logger = logging.getLogger("linaro_image_tools") logger.info( "Copying spl '%s' to boot partition." % spl_file) cmd_runner.run(["cp", "-v", spl_file, boot_dir], @@ -1096,6 +1105,7 @@ class BoardConfig(object): @classmethod def _get_kflavor_files_v2(cls, path): kernel = initrd = dtb = None + logger = logging.getLogger("linaro_image_tools") if cls.vmlinuz: kernel = _get_file_matching(os.path.join(path, cls.vmlinuz)) |