Information Technology Reference
In-Depth Information
* log[Hello, this is an important message!] action write[2014-08-14T12:30:45
-07:00] INFO: Processing log[Hello, this is an important message.] action
write (@recipe_files::/learningchef/hello.rb line 1)
[2014-08-14T12:30:45-07:00] INFO: Hello, this is an important message.
[2014-08-14T12:30:45-07:00] INFO: Chef Run complete in 0.040486944 seconds
Running handlers:
[2014-08-14T12:30:45-07:00] INFO: Running report handlers
Running handlers complete
[2014-08-14T12:30:45-07:00] INFO: Report handlers complete
Chef Client finished, 1/1 resources updated in 2.275689636 seconds
By default,
chef-client
prints out log messages to the screen. Now that you have reset the
log level, you see your important message in the log output (along with some other messages
that are also at the
info
level of severity).
NOTE
If you would prefer to write the
chef-client
log to a file, use the
--logfile
<LOGLOCATION>
option (or the short form
-l
).
Chef Client Modes
Chef Client can operate in one of three modes:
▪ Local mode
▪ Client mode
▪ Solo mode
When
chef-client
is running in
local mode
, it simulates a full Chef Server instance in
memory. Any data that would have been saved to a server is written to the local directory.
The process of writing server data locally is called
writeback
. This is why
client-client
created the
nodes/
directory. Local mode was designed to support rapid Chef recipe develop-
ment by using Chef Zero, the in-memory, fast-start Chef server.