Class | Puppet::Util::Log |
In: |
lib/puppet/util/log.rb
|
Parent: | Object |
Pass feedback to the user. Log levels are modeled after syslog‘s, and it is expected that that will be the most common log destination. Supports multiple destinations, one of which is a remote server.
RED | = | {:console => "[0;31m", :html => "FFA0A0"} |
GREEN | = | {:console => "[0;32m", :html => "00CD00"} |
YELLOW | = | {:console => "[0;33m", :html => "FFFF60"} |
BLUE | = | {:console => "[0;34m", :html => "80A0FF"} |
PURPLE | = | {:console => "[0;35m", :html => "FFA500"} |
CYAN | = | {:console => "[0;36m", :html => "40FFFF"} |
WHITE | = | {:console => "[0;37m", :html => "FFFFFF"} |
HRED | = | {:console => "[1;31m", :html => "FFA0A0"} |
HGREEN | = | {:console => "[1;32m", :html => "00CD00"} |
HYELLOW | = | {:console => "[1;33m", :html => "FFFF60"} |
HBLUE | = | {:console => "[1;34m", :html => "80A0FF"} |
HPURPLE | = | {:console => "[1;35m", :html => "FFA500"} |
HCYAN | = | {:console => "[1;36m", :html => "40FFFF"} |
HWHITE | = | {:console => "[1;37m", :html => "FFFFFF"} |
RESET | = | {:console => "[0m", :html => "" } |
file | [RW] | |
level | [RW] | |
line | [RW] | |
message | [RW] | |
remote | [RW] | |
source | [R] | |
time | [RW] | |
version | [RW] |
Create a new log message. The primary role of this method is to avoid creating log messages below the loglevel.
Route the actual message. FIXME There are lots of things this method should do, like caching, storing messages when there are not yet destinations, a bit more. It‘s worth noting that there‘s a potential for a loop here, if the machine somehow gets the destination set as itself.