We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bef1890 commit 321ca8aCopy full SHA for 321ca8a
lib/Rex/Logger.pm
@@ -32,11 +32,10 @@ package Rex::Logger;
32
33
use strict;
34
use warnings;
35
+use Exporter::Shiny qw/debug info warn error/;
36
37
# VERSION
38
-#use Rex;
39
-
40
our $no_color = 0;
41
eval "use Term::ANSIColor";
42
if ($@) { $no_color = 1; }
@@ -105,7 +104,7 @@ sub init {
105
104
$log_opened = 1;
106
}
107
108
-sub info {
+sub logger {
109
my ( $msg, $type ) = @_;
110
my $color = 'green';
111
@@ -171,6 +170,10 @@ sub info {
171
170
172
173
+sub warn { logger( shift, "warn" ) }
174
+sub error { logger( shift, "error" ) }
175
+sub info { logger( shift, "info" ) }
176
+
177
sub debug {
178
my ($msg) = @_;
179
return if $silent;
0 commit comments