aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Log.rakumod10
-rw-r--r--lib/Log/Implementation.rakumod (renamed from lib/Log/Abstract.rakumod)7
2 files changed, 6 insertions, 11 deletions
diff --git a/lib/Log.rakumod b/lib/Log.rakumod
index 946a21e..c308544 100644
--- a/lib/Log.rakumod
+++ b/lib/Log.rakumod
@@ -2,16 +2,10 @@
use v6.d;
-use Log::Abstract;
+use Log::Implementation;
use Log::Level;
-sub EXPORT
-{
- %(
- 'Log' => Log::Abstract,
- 'Log::Level' => Log::Level,
- )
-}
+unit module Log;
our $instance;
diff --git a/lib/Log/Abstract.rakumod b/lib/Log/Implementation.rakumod
index 81ec093..a4ab7db 100644
--- a/lib/Log/Abstract.rakumod
+++ b/lib/Log/Implementation.rakumod
@@ -4,7 +4,8 @@ use v6.d;
use Log::Level;
-unit role Log::Abstract;
+#| The role for a Log implementation.
+unit role Log::Implementation;
# Methods for handling plain string messages.
multi method emergency (Str:D $) { * }
@@ -17,7 +18,7 @@ multi method info (Str:D $) { * }
multi method debug (Str:D $) { * }
# Methods for handling formatted messages.
-multi method emergency (Str:D $, *@) { * }
+multi method emergency (Str:D $template, *@args) { samewith($template.fmt(|@args)) }
multi method alert (Str:D $, *@) { * }
multi method critical (Str:D $, *@) { * }
multi method error (Str:D $, *@) { * }
@@ -32,7 +33,7 @@ multi method add-output (IO::Handle:D $, Int() $ where Log::Level::Emergency ≤
=begin pod
=NAME Log::Abstract
-=VERSION 0.2.0
+=VERSION 0.1.1
=AUTHOR Patrick Spek <p.spek@tyil.nl>
=begin LICENSE