diff --git a/lib/librarian/helpers/debug.rb b/lib/librarian/helpers/debug.rb
index <HASH>..<HASH> 100644
--- a/lib/librarian/helpers/debug.rb
+++ b/lib/librarian/helpers/debug.rb
@@ -6,6 +6,8 @@ module Librarian
 
       include Support::AbstractMethod
 
+      LIBRARIAN_PATH = Pathname.new('../../../../').expand_path(__FILE__)
+
       abstract_method :root_module
 
     private
@@ -17,6 +19,9 @@ module Librarian
       def debug
         if root_module.ui
           loc = caller.find{|l| !(l =~ /in `debug'$/)}
+          if loc =~ /^(.+):(\d+):in `(.+)'$/
+            loc = "#{Pathname.new($1).relative_path_from(LIBRARIAN_PATH)}:#{$2}:in `#{$3}'"
+          end
           root_module.ui.debug { "[Librarian] #{yield} [#{loc}]" }
         end
       end
Strip the location where librarian is installed from debugging output.