aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2020-07-02 12:21:33 +0200
committerPatrick Spek <p.spek@tyil.nl>2020-07-02 12:21:33 +0200
commitbe1db7a9c513ec59337f1d1ef57a8402e987c50c (patch)
treed1a13763a20df4922ea29b58fd9d2a27ed0fbcb1
parente3f290ab0743212e1a31552205753d2210529a09 (diff)
Rename some stuff around
-rw-r--r--META6.json4
-rw-r--r--lib/Log.rakumod10
-rw-r--r--lib/Log/Implementation.rakumod (renamed from lib/Log/Abstract.rakumod)7
3 files changed, 8 insertions, 13 deletions
diff --git a/META6.json b/META6.json
index b42a639..1fc3601 100644
--- a/META6.json
+++ b/META6.json
@@ -10,9 +10,9 @@
"perl": "6.d",
"provides": {
"Log": "lib/Log.rakumod",
- "Log::Abstract": "lib/Log/Abstract.rakumod",
+ "Log::Implementation": "lib/Log/Implementation.rakumod",
"Log::Level": "lib/Log/Level.rakumod"
},
"source-url": "https://home.tyil.nl/git/raku/Log/",
"version": "0.2.0"
-} \ No newline at end of file
+}
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