From c6ea7f87997bfa89f9f1a63aa20ee4b24ac24c5d Mon Sep 17 00:00:00 2001
From: David Lehman <dlehman@redhat.com>
Date: Wed, 6 Feb 2013 14:17:57 -0600
Subject: [PATCH 7/7] Rename the main blivet logger from "storage" to "blivet".

---
 blivet/__init__.py          | 2 +-
 blivet/dasd.py              | 2 +-
 blivet/deviceaction.py      | 2 +-
 blivet/devicefactory.py     | 2 +-
 blivet/devicelibs/btrfs.py  | 2 +-
 blivet/devicelibs/dm.py     | 2 +-
 blivet/devicelibs/edd.py    | 2 +-
 blivet/devicelibs/loop.py   | 2 +-
 blivet/devicelibs/lvm.py    | 2 +-
 blivet/devicelibs/mdraid.py | 2 +-
 blivet/devicelibs/mpath.py  | 2 +-
 blivet/devicelibs/swap.py   | 2 +-
 blivet/devices.py           | 4 ++--
 blivet/devicetree.py        | 2 +-
 blivet/fcoe.py              | 2 +-
 blivet/formats/__init__.py  | 2 +-
 blivet/formats/disklabel.py | 2 +-
 blivet/formats/dmraid.py    | 2 +-
 blivet/formats/fs.py        | 2 +-
 blivet/formats/luks.py      | 2 +-
 blivet/formats/lvmpv.py     | 2 +-
 blivet/formats/mdraid.py    | 2 +-
 blivet/formats/multipath.py | 2 +-
 blivet/formats/prepboot.py  | 2 +-
 blivet/formats/swap.py      | 2 +-
 blivet/iscsi.py             | 2 +-
 blivet/partitioning.py      | 2 +-
 blivet/platform.py          | 2 +-
 blivet/storage_log.py       | 6 +++---
 blivet/udev.py              | 2 +-
 blivet/util.py              | 2 +-
 blivet/zfcp.py              | 2 +-
 examples/list_devices.py    | 2 +-
 33 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/blivet/__init__.py b/blivet/__init__.py
index 8f4422e..bf3037f 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -76,7 +76,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 def enable_installer_mode():
     global isys
diff --git a/blivet/dasd.py b/blivet/dasd.py
index e474bc0..8370e9b 100644
--- a/blivet/dasd.py
+++ b/blivet/dasd.py
@@ -29,7 +29,7 @@ from . import ROOT_PATH
 from .udev import udev_trigger
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
diff --git a/blivet/deviceaction.py b/blivet/deviceaction.py
index bd61156..e615536 100644
--- a/blivet/deviceaction.py
+++ b/blivet/deviceaction.py
@@ -35,7 +35,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 from contextlib import contextmanager
 
diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py
index a0be786..2c07187 100644
--- a/blivet/devicefactory.py
+++ b/blivet/devicefactory.py
@@ -35,7 +35,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 DEVICE_TYPE_LVM = 0
 DEVICE_TYPE_MD = 1
diff --git a/blivet/devicelibs/btrfs.py b/blivet/devicelibs/btrfs.py
index 08620de..2f0cee4 100644
--- a/blivet/devicelibs/btrfs.py
+++ b/blivet/devicelibs/btrfs.py
@@ -30,7 +30,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 def btrfs(args, capture=False):
     if capture:
diff --git a/blivet/devicelibs/dm.py b/blivet/devicelibs/dm.py
index f8ef9b3..382b931 100644
--- a/blivet/devicelibs/dm.py
+++ b/blivet/devicelibs/dm.py
@@ -30,7 +30,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 def dm_setup(args):
     ret = util.run_program(["dmsetup"] + args)
diff --git a/blivet/devicelibs/edd.py b/blivet/devicelibs/edd.py
index 30e8004..dab37f0 100644
--- a/blivet/devicelibs/edd.py
+++ b/blivet/devicelibs/edd.py
@@ -27,7 +27,7 @@ import os
 import re
 import struct
 
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 re_host_bus = re.compile(r'^PCI\s*(\S*)\s*channel: (\S*)\s*$')
 re_interface_scsi = re.compile(r'^SCSI\s*id: (\S*)\s*lun: (\S*)\s*$')
diff --git a/blivet/devicelibs/loop.py b/blivet/devicelibs/loop.py
index 9696552..acaa61c 100644
--- a/blivet/devicelibs/loop.py
+++ b/blivet/devicelibs/loop.py
@@ -29,7 +29,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 
 def losetup(args, capture=False):
diff --git a/blivet/devicelibs/lvm.py b/blivet/devicelibs/lvm.py
index bf289f9..60fffc1 100644
--- a/blivet/devicelibs/lvm.py
+++ b/blivet/devicelibs/lvm.py
@@ -25,7 +25,7 @@ import math
 import re
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 from .. import util
 from .. import arch
diff --git a/blivet/devicelibs/mdraid.py b/blivet/devicelibs/mdraid.py
index f238b31..0a3fdf7 100644
--- a/blivet/devicelibs/mdraid.py
+++ b/blivet/devicelibs/mdraid.py
@@ -29,7 +29,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 # these defaults were determined empirically
 MD_SUPERBLOCK_SIZE = 2.0    # MB
diff --git a/blivet/devicelibs/mpath.py b/blivet/devicelibs/mpath.py
index d49ab07..63f65a6 100644
--- a/blivet/devicelibs/mpath.py
+++ b/blivet/devicelibs/mpath.py
@@ -7,7 +7,7 @@ from ..flags import flags
 from ..storage_log import log_method_call
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 def parseMultipathOutput(output):
     """
diff --git a/blivet/devicelibs/swap.py b/blivet/devicelibs/swap.py
index 1ddb2e3..fc3f940 100644
--- a/blivet/devicelibs/swap.py
+++ b/blivet/devicelibs/swap.py
@@ -31,7 +31,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 def mkswap(device, label=''):
     # We use -f to force since mkswap tends to refuse creation on lvs with
diff --git a/blivet/devices.py b/blivet/devices.py
index 7e03fbc..791084a 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -123,7 +123,7 @@ _ = lambda x: gettext.ldgettext("blivet", x)
 P_ = lambda x, y, z: gettext.ldngettext("blivet", x, y, z)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 def get_device_majors():
     majors = {}
@@ -434,7 +434,7 @@ class StorageDevice(Device):
         represented by an FS instance. A StorageDevice's create method
         should create a filesystem if one has been specified.
     """
-    _type = "storage"
+    _type = "blivet"
     _devDir = "/dev"
     sysfsBlockDir = "class/block"
     _resizable = False
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 3559a56..35b9385 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -52,7 +52,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 
 class DeviceTree(object):
diff --git a/blivet/fcoe.py b/blivet/fcoe.py
index 0d67779..19831fa 100644
--- a/blivet/fcoe.py
+++ b/blivet/fcoe.py
@@ -24,7 +24,7 @@ from .udev import udev_settle
 from . import ROOT_PATH
 import logging
 import time
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
diff --git a/blivet/formats/__init__.py b/blivet/formats/__init__.py
index 04b8187..c8ddc0b 100644
--- a/blivet/formats/__init__.py
+++ b/blivet/formats/__init__.py
@@ -36,7 +36,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 
 device_formats = {}
diff --git a/blivet/formats/disklabel.py b/blivet/formats/disklabel.py
index 2bab83b..90b73f3 100644
--- a/blivet/formats/disklabel.py
+++ b/blivet/formats/disklabel.py
@@ -36,7 +36,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 
 class DiskLabel(DeviceFormat):
diff --git a/blivet/formats/dmraid.py b/blivet/formats/dmraid.py
index 5836c26..2bf4567 100644
--- a/blivet/formats/dmraid.py
+++ b/blivet/formats/dmraid.py
@@ -29,7 +29,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 
 class DMRaidMember(DeviceFormat):
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 81a00e9..5ec1948 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -41,7 +41,7 @@ from parted import fileSystemType
 from ..storage_log import log_method_call
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
diff --git a/blivet/formats/luks.py b/blivet/formats/luks.py
index d91a76d..ab12eba 100644
--- a/blivet/formats/luks.py
+++ b/blivet/formats/luks.py
@@ -38,7 +38,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 
 class LUKS(DeviceFormat):
diff --git a/blivet/formats/lvmpv.py b/blivet/formats/lvmpv.py
index c7cf795..e610f66 100644
--- a/blivet/formats/lvmpv.py
+++ b/blivet/formats/lvmpv.py
@@ -32,7 +32,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 
 class LVMPhysicalVolume(DeviceFormat):
diff --git a/blivet/formats/mdraid.py b/blivet/formats/mdraid.py
index 5c70764..a99dec8 100644
--- a/blivet/formats/mdraid.py
+++ b/blivet/formats/mdraid.py
@@ -33,7 +33,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 
 class MDRaidMember(DeviceFormat):
diff --git a/blivet/formats/multipath.py b/blivet/formats/multipath.py
index cf3e3eb..4102cb0 100644
--- a/blivet/formats/multipath.py
+++ b/blivet/formats/multipath.py
@@ -32,7 +32,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 class MultipathMember(DeviceFormat):
     """ A multipath member disk. """
diff --git a/blivet/formats/prepboot.py b/blivet/formats/prepboot.py
index dd2cf8c..c7ed111 100644
--- a/blivet/formats/prepboot.py
+++ b/blivet/formats/prepboot.py
@@ -26,7 +26,7 @@ from . import DeviceFormat, register_device_format
 from parted import PARTITION_PREP
 import os
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 class PPCPRePBoot(DeviceFormat):
     """ Generic device format. """
diff --git a/blivet/formats/swap.py b/blivet/formats/swap.py
index dd3d375..da8f4df 100644
--- a/blivet/formats/swap.py
+++ b/blivet/formats/swap.py
@@ -31,7 +31,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 
 class SwapSpace(DeviceFormat):
diff --git a/blivet/iscsi.py b/blivet/iscsi.py
index 9f07e08..1d34407 100644
--- a/blivet/iscsi.py
+++ b/blivet/iscsi.py
@@ -29,7 +29,7 @@ import time
 import hashlib
 import random
 import itertools
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
diff --git a/blivet/partitioning.py b/blivet/partitioning.py
index 659accf..76b2859 100644
--- a/blivet/partitioning.py
+++ b/blivet/partitioning.py
@@ -36,7 +36,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 def _getCandidateDisks(storage):
     """ Return a list of disks with space for a default-sized partition. """
diff --git a/blivet/platform.py b/blivet/platform.py
index b99392d..3f7a00c 100644
--- a/blivet/platform.py
+++ b/blivet/platform.py
@@ -21,7 +21,7 @@
 #
 import os
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 import parted
 
diff --git a/blivet/storage_log.py b/blivet/storage_log.py
index 62ad86f..dc3ee52 100644
--- a/blivet/storage_log.py
+++ b/blivet/storage_log.py
@@ -1,7 +1,7 @@
 import inspect
 import logging
 
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 log.addHandler(logging.NullHandler())
 
 def function_name_and_depth():
@@ -34,7 +34,7 @@ def log_method_call(d, *args, **kwargs):
             v = "Skipped"
         fmt_args.extend([k, v])
 
-    logging.getLogger("storage").debug(fmt % tuple(fmt_args))
+    logging.getLogger("blivet").debug(fmt % tuple(fmt_args))
 
 def log_method_return(d, retval):
     classname = d.__class__.__name__
@@ -42,5 +42,5 @@ def log_method_return(d, retval):
     spaces = depth * ' '
     fmt = "%s%s.%s returned %s"
     fmt_args = (spaces, classname, methodname, retval)
-    logging.getLogger("storage").debug(fmt % fmt_args)
+    logging.getLogger("blivet").debug(fmt % fmt_args)
 
diff --git a/blivet/udev.py b/blivet/udev.py
index f8ba09c..ec1dcaa 100644
--- a/blivet/udev.py
+++ b/blivet/udev.py
@@ -31,7 +31,7 @@ import pyudev
 global_udev = pyudev.Udev()
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 def udev_enumerate_devices(deviceClass="block"):
     devices = global_udev.enumerate_devices(subsystem=deviceClass)
diff --git a/blivet/util.py b/blivet/util.py
index dd62ce8..495dba1 100644
--- a/blivet/util.py
+++ b/blivet/util.py
@@ -4,7 +4,7 @@ import subprocess
 import re
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 program_log = logging.getLogger("program")
 
 from threading import Lock
diff --git a/blivet/zfcp.py b/blivet/zfcp.py
index c4ea90b..f635a1a 100644
--- a/blivet/zfcp.py
+++ b/blivet/zfcp.py
@@ -29,7 +29,7 @@ import gettext
 _ = lambda x: gettext.ldgettext("blivet", x)
 
 import logging
-log = logging.getLogger("storage")
+log = logging.getLogger("blivet")
 
 def loggedWriteLineToFile(fn, value):
     f = open(fn, "w")
diff --git a/examples/list_devices.py b/examples/list_devices.py
index e10e100..1abd450 100644
--- a/examples/list_devices.py
+++ b/examples/list_devices.py
@@ -1,7 +1,7 @@
 import logging
 import sys
 
-blivet_log = logging.getLogger("storage")
+blivet_log = logging.getLogger("blivet")
 
 def set_up_logging():
     # doing this before importing blivet gets the logging from format class
-- 
1.8.1

