See the formatting section below for another example using
a where block to define some formatted loggers for a top-level
myLogHook.

Loggers are named either for their function, as in battery,
aumixVolume, and maildirNew, or are prefixed with "log" when
making use of other functions or by analogy with the pp* functions.
For example, the logger version of ppTitle
is logTitle, and logFileCount loggerizes the result of file
counting code.

Formatting utility names are generally as short as possible and
carry the suffix "L". For example, the logger version of
shorten is shortenL.

Of course, there is nothing really special about these so-called
"loggers": they are just X (Maybe String) actions. So you can
use them anywhere you would use an X (Maybe String), not just
with DynamicLog.

System Loggers

Get the battery status (percent charge and charging/discharging
status). This is an ugly hack and may not work for some people.
At some point it would be nice to make this more general/have
fewer dependencies (assumes /usr/bin/acpi and sed are installed.)

Get the current date and time, and format them via the
given format string. The format used is the same as that used
by the C library function strftime; for example,
date "%a %b %d" might display something like Tue Feb 19.
For more information see something like
http://www.cplusplus.com/reference/clibrary/ctime/strftime.html.

Get the load average. This assumes that you have a
utility called /usr/bin/uptime and that you have sed
installed; these are fairly common on GNU/Linux systems but it
would be nice to make this more general.

XMonad Loggers

A very small sample of what you can log since you have access to X. For
example you can loggerize the number of windows on each workspace, or
titles on other workspaces, or the id of the previously focused workspace....

Formatting Utilities

Combine logger formatting functions to make your
ppExtras more colorful and readable.
(For convenience this module exports <$> to
use instead of '.' or '$' in hard to read formatting lines.
For example:

Note: When applying shortenL or fixedWidthL to logger strings
containing colors or other formatting commands, apply the formatting
after the length adjustment, or include "invisible" characters
in the length specification, e.g. in the above '^fg(cornsilk3)' and
'^fg()' yields 19 invisible and 80 visible characters.

Make a logger's output constant width by padding with the given string,
even if the logger isX (Nothing)orX (Just ""). Useful to
reduce visual noise as a title logger shrinks and grows, to use a fixed
width for a logger that sometimes becomes Nothing, or even to create
fancy spacers or character based art effects.

It fills missing logger output with a repeated character like ".",
":" or pattern, like " -.-". The cycling padding string is reversed on
the left of the logger output. This is mainly useful with AlignCenter.