=head1 Name

sqitch-log - Show database deployment event history

=head1 Synopsis

  sqitch [options] log [<options>]

=head1 Description

Sqitch keeps a record of the deployment, failed deployment, or reversion of
all changes in a database. Even after a change has been reverted, a log of its
earlier deployment is retained. The C<log> command is your key to accessing
it. You can simply list all the events, search for events matching regular
expressions, and limit the results.

=head1 Options

=over

=item C<--event>

Filter by event type. May be specified more than once. Allowed values are:

=over

=item * C<deploy>

=item * C<revert>

=item * C<fail>

=back

=item C<--change-pattern>

=item C<--change>

=item C<-c>

A regular expression to match against change names.

=item C<--actor-pattern>

=item C<--actor>

=item C<-a>

A regular expression to match against actor (user) names.

=item C<--format>

=item C<-f>

The format to use. May be one of:

=over

=item C<full>

=item C<long>

=item C<medium>

=item C<short>

=item C<oneline>

=item C<raw>

=item C<< format:<string> >>

=back

See L</Formats> for details on each format. Defaults to <medium>.

=item C<--date-format>

=item C<--date>

Format to use for timestamps. Defaults to C<iso>. Allowed values:

=over

=item C<iso>

=item C<iso8601>

Shows timestamps in ISO-8601 format.

=item C<rfc>

=item C<rfc2822>

Show timestamps in RFC-2822 format.

=item C<full>

=item C<long>

=item C<medium>

=item C<short>

Show timestamps in the specified format length, using the system locale's
C<LC_TIME> category.

=item C<strftime:$string>

Show timestamps using an arbitrary C<strftime> pattern. See
L<DateTime/strftime Paterns> for comprehensive documentation of supported
patterns.

=item C<cldr:$string>

Show timestamps using an arbitrary C<cldr> pattern. See L<DateTime/CLDR
Paterns> for comprehensive documentation of supported patterns.

=back

=item C<--max-count>

=item C<-n>

Limit the number of events to output.

=item C<--skip>

Skip the specified number events before starting to show the event output.

=item C<--reverse>

Output the events in reverse order. 

=item C<--no-reverse>

Do not output the events in reverse order. 

=item C<--color>

Show colored output. The value may be one of:

=over

=item C<auto> (the default)

=item C<always>

=item C<never>

=back

=item C<--no-color>

Turn off colored output. It is the same as C<--color never>.

=item C<--abbrev>

Instead of showing the full 40-byte hexadecimal change ID, show only a partial
prefix the specified number of characters long.

=back

=head1 Configuration Variables

=over

=item C<log.format>

Output format to use. Supports the same values as C<--format>.

=item C<log.date_format>

Format to use for timestamps. Supports the same values as the C<--date-format>
option.

=item C<log.color>

Output colors. Supports the same values as the C<--color> option.

=back

=head1 Formats

The format:<string> format allows you to specify which information you want to
show. It works a little bit like C<printf> format. Like the Git log format,
you can use C<%n> for a newline, but an actual newline is okay, too.

=over

=item * C<%e>: Event type (deploy, revert, fail)

=item * C<%H>: Event change ID

=item * C<%h>: Event change ID (respects C<--abbrev>)

=item * C<%c>: Event change name

=item * C<%($len)h>: abbreviated change of length C<$len>

=item * C<%l>: Localized lowercase event type label

=item * C<%L>: Localized title case event type label

=item * C<%{event}_> Localized label for "event"

=item * C<%{change}_> Localized label for "change"

=item * C<%{actor}_> Localized label for "actor"

=item * C<%{by}_> Localized label for "by"

=item * C<%{date}_> Localized label for "date"

=item * C<%{name}_> Localized label for "name"

=item * C<%a>: Event actor name

=item * C<%d>: Formatted Event date (respects C<--date-format>)

=item * C<%{rfc}d>: date, RFC2822 format

=item * C<%{iso}d>: date, ISO-8601 format

=item * C<%{full}d>: date, full format

=item * C<%{long}d>: date, long format

=item * C<%{medium}d>: date, medium format

=item * C<%{short}d>: date, short format

=item * C<%t>: Comma-delimited list of tags

=item * C<%{$sep}t>: list of tags delimited by C<$sep>

=item * C<%T>: Parenthesized list of comma-delimited tags

=item * C<%{$sep}T>: Parenthesized list of tags delimited by C<$sep>

=item * C<%n> newline

=item * C<%{color}C>: An ANSI color: black red green yellow blue magenta cyan white, reset

=back

=head1 Sqitch

Part of the L<sqitch> suite.
