-  my ($self, $prefix, $message) = @_;
-  my $date = strftime("%Y-%m-%d %H:%M:%S $$ [" . getppid() . "] ${prefix}: ", localtime(time()));
+  my ($self, $prefix, $message, %options) = @_;
+
+  my @prefixes = ($prefix);
+
+  if ($options{show_caller}) {
+    my $level = 1;
+    while (1) {
+      my ($package, $filename, $line, $subroutine) = caller($level);
+
+      if (($filename // '') =~ m{LXDebug\.pm$}) {
+        $level++;
+        next;
+      }
+
+      push @prefixes, "${filename}:${line}";
+      last;
+    }
+  }
+
+  $prefix = join ' ', grep { $_ } @prefixes;
+
+  my @now  = gettimeofday();
+  my $date = strftime("%Y-%m-%d %H:%M:%S." . sprintf('%03d', int($now[1] / 1000)) . " $$ [" . getpid() . "] ${prefix}: ", localtime($now[0]));