1Rex::Logger(3) User Contributed Perl Documentation Rex::Logger(3)
2
3
4
6 Rex::Logger - Logging Module
7
9 This module is the logging module. You can define custom logformats.
10
12 $Rex::Logger::format = '[%D] %s';
13 # will output something like
14 # [2012-04-12 18:35:12] Installing package vim
15
16 $Rex::Logger::format = '%h - %D - %s';
17 # will output something like
18 # srv001 - 2012-04-12 18:35:12 - Installing package vim
19
21 $debug
22 Setting this variable to 1 will enable debug logging.
23
24 $Rex::Logger::debug = 1;
25
26 $silent
27 If you set this variable to 1 nothing will be logged.
28
29 $Rex::Logger::silent = 1;
30
31 $format
32 You can define the logging format with the following parameters.
33
34 %D - Appends the current date yyyy-mm-dd HH:mm:ss
35
36 %h - The target host
37
38 %p - The pid of the running process
39
40 %l - Loglevel (INFO or DEBUG)
41
42 %s - The Logstring
43
44 Default is: [%D] %l - %s
45
46
47
48perl v5.30.2 2020-04-06 Rex::Logger(3)