From c59d3dff38e26eee0c4eedb653b38e745b150ba5 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Wed, 15 Jul 2020 14:04:01 +0200 Subject: Update documentation to use $Log::instance --- lib/Log.rakumod | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'lib/Log.rakumod') diff --git a/lib/Log.rakumod b/lib/Log.rakumod index 9a9004e..790d517 100644 --- a/lib/Log.rakumod +++ b/lib/Log.rakumod @@ -12,7 +12,7 @@ our $instance; =begin pod =NAME Log -=VERSION 0.3.0 +=VERSION 0.3.1 =AUTHOR Patrick Spek =head1 Description @@ -30,17 +30,17 @@ C, C, or C. The C role itself only helps in ensuring the interfaces are the same, allowing easy replacement of the implementation if ever needed in the future. -Whatever imlementation of C you use, it C be set in the C<$*LOG> -dynamic variable. This makes it available to all the libraries that are used in -the program. You C set it as early as possible. +Whatever implementation of C you use, it C be set in the +C<$Log::instance> variable. This makes it available to all the libraries that +are used in the program. You C set it as early as possible. -Because it must be using the C<$*LOG> variable, module developers around the -ecosystem can rely on it for their logging needs. However, not every +Because it must be using the C<$Log::instance> variable, module developers +around the ecosystem can rely on it for their logging needs. However, not every application will implement this, and that needs to be accounted for, too. For this, make use of Raku's C flow control statement. =begin code :lang -.notice('This is a log message') with $*LOG; +.notice('This is a log message') with $Log::instance; =end code This can be used freely and safely, throughout all modules. Any application @@ -59,25 +59,17 @@ unit class Log::Custom is Log; =head3 Methods -There are 8 log levels, each with two method calls to invoke them. All of these -I be implemented. +There are 8 log levels, each represented by a method calls to invoke them. All +of these I be implemented. =item C -=item C =item C -=item C =item C -=item C =item C -=item C =item C -=item C =item C =item C -=item C -=item C =item C -=item C Additionally, the following configuration method I be implemented. -- cgit v1.1