diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -8,6 +8,11 @@
 main =
     defaultMainWithHooks $ simpleUserHooks { runTests = runTests' }
   where
-    runTests' _ _ _ _ = do
-        system "runhaskell -i./src src/test.hs"
-        return ()
+    runTests' _ _ _ _ =
+        mapM_ runTest ["test.hs", "testNamed.hs"]
+      where
+        runTest fp = do
+            putStrLn $ fp ++ ":"
+            system $ "runhaskell -i./src src/" ++ fp
+            putStrLn ""
+            return ()
diff --git a/hslogger-template.cabal b/hslogger-template.cabal
--- a/hslogger-template.cabal
+++ b/hslogger-template.cabal
@@ -1,5 +1,5 @@
 name:        hslogger-template
-version:     1.0.0
+version:     1.1.0
 category:    Interfaces
 synopsis:    Automatic generation of hslogger functions
 description: Library for generating hslogger functions using Template Haskell.
@@ -11,7 +11,7 @@
 build-type:    Custom
 
 extra-source-files:
-  src/test.hs
+  src/test.hs, src/testNamed.hs
 
 library
   hs-source-dirs:
diff --git a/src/System/Log/Logger/TH.hs b/src/System/Log/Logger/TH.hs
--- a/src/System/Log/Logger/TH.hs
+++ b/src/System/Log/Logger/TH.hs
@@ -5,6 +5,7 @@
 module System.Log.Logger.TH
   (
     deriveLoggers
+  , deriveNamedLoggers
   )
   where
 
@@ -42,6 +43,10 @@
 --
 -- > Foo.Bar: hi there
 --
+-- If the automatically determined module name would not be informative enough
+-- (e.g., "Main"), @deriveNamedLoggers@ allows you to specify a different
+-- message prefix.
+--
 -- Notes:
 --
 --   * "System.Log.Logger" must be imported qualified, and the qualifier must
@@ -58,6 +63,14 @@
 deriveLoggers qualifier priorities =
     fmap TH.loc_module TH.location >>= \moduleName ->
       fmap concat (mapM (deriveLogger qualifier moduleName) priorities)
+
+deriveNamedLoggers
+  :: String          -- ^ Message prefix, e.g., "SomeProgram".
+  -> String          -- ^ Must match qualifier on import of "System.Log.Logger".
+  -> [HSL.Priority]  -- ^ List of priorities for which to generate logging functions.
+  -> TH.Q [TH.Dec]
+deriveNamedLoggers prefix qualifier priorities =
+      fmap concat (mapM (deriveLogger qualifier prefix) priorities)
 
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 
diff --git a/src/testNamed.hs b/src/testNamed.hs
new file mode 100644
--- /dev/null
+++ b/src/testNamed.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+module Main (main) where
+
+import System.Log.Logger.TH (deriveNamedLoggers)
+import qualified System.Log.Logger as HSL
+
+$(deriveNamedLoggers "testNamed" "HSL" [HSL.DEBUG, HSL.INFO, HSL.NOTICE, HSL.WARNING, HSL.ERROR, HSL.CRITICAL, HSL.ALERT, HSL.EMERGENCY])
+
+main :: IO ()
+main = do
+    HSL.updateGlobalLogger "testNamed" (HSL.setLevel HSL.DEBUG)
+    mapM_ (\(f, fn, i) -> f (show i ++ " " ++ fn)) (zip3 functions functionNames numbers)
+  where
+    functions     = [debugM, infoM, noticeM, warningM, errorM, criticalM, alertM, emergencyM]
+    functionNames = ["debugM", "infoM", "noticeM", "warningM", "errorM", "criticalM", "alertM", "emergencyM"]
+    numbers       = [1..] :: [Integer]
