From e14b96f2bc62a0380e97a123701b919f85f10e38 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Thu, 2 Jul 2020 16:06:38 +0200
Subject: Update Log to latest version
---
META6.json | 4 +-
lib/Log/Colored.rakumod | 117 +-----------------------------------------------
2 files changed, 4 insertions(+), 117 deletions(-)
diff --git a/META6.json b/META6.json
index 4431c64..6a46782 100644
--- a/META6.json
+++ b/META6.json
@@ -5,7 +5,7 @@
"Patrick Spek "
],
"depends": [
- "Log:auth",
+ "Log:auth:ver<0.3.0>",
"Terminal::ANSIColor"
],
"description": "A Log implementation with colored output",
@@ -17,4 +17,4 @@
},
"source-url": "https://home.tyil.nl/git/raku/Log::Colored/",
"version": "0.1.1"
-}
\ No newline at end of file
+}
diff --git a/lib/Log/Colored.rakumod b/lib/Log/Colored.rakumod
index 2c37910..b22a098 100644
--- a/lib/Log/Colored.rakumod
+++ b/lib/Log/Colored.rakumod
@@ -2,12 +2,12 @@
use v6.d;
-use Log;
+use Log::Implementation;
use Log::Level;
use Terminal::ANSIColor;
#| An implementation of Log with colors.
-unit class Log::Colored is Log;
+unit class Log::Colored is Log::Implementation;
#| An array of hashes. Each has must have a handle key, with an IO::Handle to
#| print messages to. A level key with an integer to signify a Log::Level is
@@ -28,20 +28,6 @@ multi method emergency (
})
}
-#| Send a formatted emergency message.
-multi method emergency (
- #| A printf-style format string.
- Str:D $format,
-
- #| Arguments to substitute into the format string placeholders.
- *@args,
-) {
- $!messages.emit({
- message => self!message($format.sprintf(|@args), 'bold underline red'),
- level => 0,
- })
-}
-
#| Send an alert message.
multi method alert (
#| The message to print.
@@ -53,20 +39,6 @@ multi method alert (
})
}
-#| Send a formatted alert message.
-multi method alert (
- #| A printf-style format string.
- Str:D $format,
-
- #| Arguments to substitute into the format string placeholders.
- *@args,
-) {
- $!messages.emit({
- message => self!message($format.sprintf(|@args), 'bold red'),
- level => 1,
- })
-}
-
#| Send a critical message.
multi method critical (
#| The message to print.
@@ -78,20 +50,6 @@ multi method critical (
})
}
-#| Send a formatted critical message.
-multi method critical (
- #| A printf-style format string.
- Str:D $format,
-
- #| Arguments to substitute into the format string placeholders.
- *@args,
-) {
- $!messages.emit({
- message => self!message($format.sprintf(|@args), 'red'),
- level => 2,
- })
-}
-
#| Send an error message.
multi method error (
#| The message to print.
@@ -103,20 +61,6 @@ multi method error (
})
}
-#| Send a formatted error message.
-multi method error (
- #| A printf-style format string.
- Str:D $format,
-
- #| Arguments to substitute into the format string placeholders.
- *@args,
-) {
- $!messages.emit({
- message => self!message($format.sprintf(|@args), 'bold yellow'),
- level => 3,
- })
-}
-
#| Send a warning message.
multi method warning (
#| The message to print.
@@ -128,20 +72,6 @@ multi method warning (
})
}
-#| Send a formatted warning message.
-multi method warning (
- #| A printf-style format string.
- Str:D $format,
-
- #| Arguments to substitute into the format string placeholders.
- *@args,
-) {
- $!messages.emit({
- message => self!message($format.sprintf(|@args), 'yellow'),
- level => 4,
- })
-}
-
#| Send a notice message. This is the "normal" level to publish log entries on.
multi method notice (
#| The message to print.
@@ -153,21 +83,6 @@ multi method notice (
})
}
-#| Send a formatted notice message. This is the "normal" level to publish log
-#| entries on.
-multi method notice (
- #| A printf-style format string.
- Str:D $format,
-
- #| Arguments to substitute into the format string placeholders.
- *@args,
-) {
- $!messages.emit({
- message => self!message($format.sprintf(|@args), 'default'),
- level => 5,
- })
-}
-
#| Send an informational message.
multi method info (
#| The message to print.
@@ -179,20 +94,6 @@ multi method info (
})
}
-#| Send a formatted informational message.
-multi method info (
- #| The printf-style format string.
- Str:D $format,
-
- #| Arguments to substitute into the format string placeholders.
- *@args,
-) {
- $!messages.emit({
- message => self!message($format.sprintf(|@args), 'cyan'),
- level => 6,
- })
-}
-
#| Send a debug message.
multi method debug (
#| The message to print.
@@ -204,20 +105,6 @@ multi method debug (
})
}
-#| Send a formatted debug message.
-multi method debug (
- #| A printf-style format string.
- Str:D $format,
-
- #| Arguments to substitute into the format string placeholders.
- *@args,
-) {
- $!messages.emit({
- message => self!message($format.sprintf(|@args), 'black'),
- level => 7,
- })
-}
-
#| Add an output to the logger.
multi method add-output (
#| The IO::Handle to write log messages to.
--
cgit v1.1