Name
sqitch-log - Show Sqitch change deployment logs
Synopsis
sqitch log [options] [<database>]
Description
Sqitch keeps a record of the deployment, failed deployment, or reversion of
all changes in a target database. Even after a change has been reverted, a log
of its earlier deployment is retained. The 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.
The <database> parameter specifies the database to which to connect,
and may also be specified as the --target option. It can be target name,
a URI, an engine name, or plan file path.
Options
-
-t -
--targetThe target database to which to connect. This option can be either a URI or the name of a target in the configuration.
-
--eventFilter by event type. May be specified more than once. Allowed values are:
deployrevertfail
-
--change-pattern -
--changeA regular expression to match against change names.
-
--project-pattern -
--projectA regular expression to match against project names.
-
--committer-pattern -
--committerA regular expression to match against committer names.
-
--format -
-fThe format to use. May be one of:
fulllongmediumshortonelinerawformat:<string>
See “Formats” for details on each format. Defaults to
medium. -
--date-format -
--dateFormat to use for timestamps. Defaults to
iso. Allowed values:-
iso -
iso8601Shows timestamps in ISO-8601 format.
-
rfc -
rfc2822Show timestamps in RFC-2822 format.
-
full -
long -
medium -
shortShow timestamps in the specified format length, using the system locale’s
LC_TIMEcategory. -
rawShow timestamps in raw format, which is strict ISO-8601 in the UTC time zone.
-
strftime:$stringShow timestamps using an arbitrary
strftimepattern. See “strftime Paterns” in DateTime for comprehensive documentation of supported patterns. -
cldr:$patternShow timestamps using an arbitrary
cldrpattern. See “CLDR Paterns” in DateTime for comprehensive documentation of supported patterns.
-
-
--max-count -
-nLimit the number of events to output.
-
--skipSkip the specified number events before starting to show the event output.
-
--reverseOutput the events in reverse order.
-
--no-reverseDo not output the events in reverse order.
-
--headersOutput headers describing target. Enabled by default.
-
--no-headersDo not output headers describing target.
-
--colorShow colored output. The value may be one of:
auto(the default)alwaysnever
-
--no-colorTurn off colored output. It is the same as
--color never. -
--abbrevInstead of showing the full 40-byte hexadecimal change ID, show only a partial prefix the specified number of characters long.
-
--onelineShorthand for
--format oneline --abbrev 6. -
--registrysqitch log --registry registryThe name of the Sqitch registry schema or database in which sqitch stores its own data.
-
--db-client -
--clientsqitch log --client /usr/local/pgsql/bin/psqlPath to the command-line client for the database engine. Defaults to a client in the current path named appropriately for the database engine.
-
-d -
--db-namesqitch log --db-name widgets sqitch log -d bricolageName of the database. In general, targets and URIs are preferred, but this option can be used to override the database name in a target.
-
-u -
--db-user -
--db-usernamesqitch log --db-username root sqitch log --db-user postgres sqitch log -u MomUser name to use when connecting to the database. Does not apply to all engines. In general, targets and URIs are preferred, but this option can be used to override the user name in a target.
-
-h -
--db-hostsqitch log --db-host db.example.com sqitch log -h appdb.example.netHost name to use when connecting to the database. Does not apply to all engines. In general, targets and URIs are preferred, but this option can be used to override the host name in a target.
-
-p -
--db-portsqitch log --db-port 7654 sqitch log -p 5431Port number to connect to. Does not apply to all engines. In general, targets and URIs are preferred, but this option can be used to override the port in a target.
Configuration Variables
-
log.formatOutput format to use. Supports the same values as
--format. -
log.date_formatFormat to use for timestamps. Supports the same values as the
--date-formatoption. -
log.colorOutput colors. Supports the same values as the
--coloroption.
Formats
There are several built-in formats, and you can emit data in a custom format
format:<string> format. Here are the details of the built-in formats:
-
oneline<change id> <event type> <project name>:<change name> <title line>This is designed to be as compact as possible.
-
short<event type> <change id> Name: <change name> Committer: <committer> <title line> -
medium<event type> <change id> Name: <change name> Committer: <committer> Date: <commit date> <full change note> -
long<event type> <change id> <tags> Name: <change name> Project: <change name> Planner: <planner> Committer: <committer> <full change note> -
full<event type> <change id> <tags> Event: <event type> Name: <change name> Project: <change name> Requires: <required changes> Conflicts: <conflicting changes> Planner: <planner> Planned: <plan date> Committer: <committer> Committed: <commit date> <full change note> -
raw<event type> <change id> <tags> name <change name> project <project name> requires <required changes> conflicts <conflicting changes> planner <planner> planned <raw plan date> committer <committer> committed <raw commit date> <full change note>Suitable for parsing: the change ID is displayed in full, without regard to the value of
--abbrev; dates are formatted raw (strict ISO-8601 format in the UTC time zone); and all labels are lowercased and unlocalized. -
format:<string>The
format:<string>format allows you to specify which information you want to show. It works a little bit likeprintfformat and a little like Git log format. For example, this format:format:The committer of %h was %{name}c%vThe title was >>%s<<%vWould show something like this:
The committer of f26a3s was Tom Lane The title was >>We really need to get this right.<<The placeholders are:
%H: Event change ID%h: Event change ID (respects--abbrev)%n: Event change name%o: Event change project name%($len)h: abbreviated change of length$len%e: Event type (deploy, revert, fail)%l: Localized lowercase event type label%L: Localized title case event type label%c: Event committer name and email address%{name}c: Event committer name%{email}c: Event committer email address%{date}c: commit date (respects--date-format)%{date:rfc}c: commit date, RFC2822 format%{date:iso}c: commit date, ISO-8601 format%{date:full}c: commit date, full format%{date:long}c: commit date, long format%{date:medium}c: commit date, medium format%{date:short}c: commit date, short format%{date:cldr:$pattern}c: commit date, formatted with custom CLDR pattern%{date:strftime:$pattern}c: commit date, formatted with custom strftime pattern%c: Change planner name and email address%{name}p: Change planner name%{email}p: Change planner email address%{date}p: plan date (respects--date-format)%{date:rfc}p: plan date, RFC2822 format%{date:iso}p: plan date, ISO-8601 format%{date:full}p: plan date, full format%{date:long}p: plan date, long format%{date:medium}p: plan date, medium format%{date:short}p: plan date, short format%{date:cldr:$pattern}p: plan date, formatted with custom CLDR pattern%{date:strftime:$pattern}p: plan date, formatted with custom strftime pattern%t: Comma-delimited list of tags%{$sep}t: list of tags delimited by$sep%T: Parenthesized list of comma-delimited tags%{$sep}T: Parenthesized list of tags delimited by$sep%s: Subject (a.k.a. title line)%r: Comma-delimited list of required changes%{$sep}r: list of required changes delimited by$sep%R: Localized label and list of comma-delimited required changes%{$sep}R: Localized label and list of required changes delimited by$sep%x: Comma-delimited list of conflicting changes%{$sep}x: list of conflicting changes delimited by$sep%X: Localized label and list of comma-delimited conflicting changes%{$sep}X: Localized label and list of conflicting changes delimited by$sep%b: Body%B: Raw body (unwrapped subject and body)%{$prefix}B: Raw body with$prefixprefixed to every line%{event}_Localized label for “event”%{change}_Localized label for “change”%{committer}_Localized label for “committer”%{planner}_Localized label for “planner”%{by}_Localized label for “by”%{date}_Localized label for “date”%{committed}_Localized label for “committed”%{planned}_Localized label for “planned”%{name}_Localized label for “name”%{project}_Localized label for “project”%{email}_Localized label for “email”%{requires}_Localized label for “requires”%{conflicts}_Localized label for “conflicts”%vvertical space (newline)%{$color}C: An ANSI color: black, red, green, yellow, reset, etc.%{:event}C: An ANSI color based on event type (green deploy, blue revert, red fail)%{$attribute}a: The raw attribute name and value, if it exists and has a value
Sqitch
Part of the sqitch suite.
