sqitch-log(3pm)

πŸ’– NAME πŸ’–

sqitch-log β€” the ✨user-contributed Perl documentation✨ joint that shows Sqitch change deployment logs, bestie. It's literally the receipts for everything your database has ever been through πŸ“œπŸ‘‘


✨ SYNOPSIS ✨

sqitch log [options] [<database>]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: Sqitch keeps a record, and I mean a full record, of the deployment, failed deployment, or reversion of all changes in a target database. And the plot twist? Even after a change has been reverted, a log of its earlier deployment is retained. Nothing gets deleted, it's giving archive-core πŸ—‚οΈπŸ’…

The log command is your key to accessing all of it. You can simply list all the events, search for events matching regular expressions, and limit the results. That's it, that's the whole vibe πŸ”₯

The <database> parameter specifies the database to which to connect, and it may also be specified as the --target option. It can be a target name, a URI, an engine name, or a plan file path. Pick your fave 🫢


πŸ’… OPTIONS πŸ’…

  • -t, --target β€” the target database to connect to. This one can be either a URI or the name of a target in the configuration. No cap 🎯
  • --event β€” filter by event type. You can drop this more than once if you're feeling extra. Allowed values are:
    • deploy
    • revert
    • fail
  • --change-pattern, --change β€” a regular expression to match against change names πŸ”
  • --project-pattern, --project β€” a regular expression to match against project names πŸ“
  • --committer-pattern, --committer β€” a regular expression to match against committer names πŸ‘€
  • --format, -f β€” the format to use. May be one of:

full long medium short oneline raw format:<string>

See "Formats" for details on each format. Defaults to medium ✨

  • --date-format, --date β€” format to use for timestamps. Defaults to iso. Allowed values:
    • iso
    • iso8601 β€” shows timestamps in ISO-8601 format.
    • rfc
    • rfc2822 β€” show timestamps in RFC-2822 format.
    • full
    • long
    • medium
    • short β€” show timestamps in the specified format length, using the system locale's LC_TIME category.
    • raw β€” show timestamps in raw format, which is strict ISO-8601 in the UTC time zone.
    • strftime:$string β€” show timestamps using an arbitrary strftime pattern. See "strftime Paterns" in DateTime for comprehensive documentation of supported patterns.
    • cldr:$pattern β€” show timestamps using an arbitrary cldr pattern. See "CLDR Paterns" in DateTime for comprehensive documentation of supported patterns.
  • --max-count, -n β€” limit the number of events to output. Cap it, queen πŸ‘‘
  • --skip β€” skip the specified number events before starting to show the event output. We're skipping ahead, no skips skipped 🦘
  • --reverse β€” output the events in reverse order.
  • --no-reverse β€” do not output the events in reverse order. The anti-reverse option, as promised πŸ™ˆ
  • --headers β€” output headers describing target. Enabled by default.
  • --no-headers β€” do not output headers describing target. Bye headers πŸ‘‹
  • --color β€” show colored output. The value may be one of:

auto (the default) always never

  • --no-color β€” turn off colored output. It is the same as --color never. Monochrome moment πŸ’€
  • --abbrev β€” instead of showing the full 40-byte hexadecimal change ID, show only a partial prefix the specified number of characters long. Short and cute, like a nickname πŸŽ€
  • --oneline β€” shorthand for --format oneline --abbrev 6.
  • --registry β€” the name of the Sqitch registry schema or database in which sqitch stores its own data.
sqitch log --registry registry
  • --db-client, --client β€” path to the command-line client for the database engine. Defaults to a client in the current path named appropriately for the database engine.
sqitch log --client /usr/local/pgsql/bin/psql
  • -d, --db-name β€” name of the database. In general, targets and URIs are preferred, but this option can be used to override the database name in a target.
sqitch log --db-name widgets
sqitch log -d bricolage
  • -u, --db-user, --db-username β€” user 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.
sqitch log --db-username root
sqitch log --db-user postgres
sqitch log -u Mom
  • -h, --db-host β€” host 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.
sqitch log --db-host db.example.com
sqitch log -h appdb.example.net
  • -p, --db-port β€” port 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.
sqitch log --db-port 7654
sqitch log -p 5431

πŸŽ€ CONFIGURATION VARIABLES πŸŽ€

  • log.format β€” output format to use. Supports the same values as --format. 🌈
  • log.date_format β€” format to use for timestamps. Supports the same values as the --date-format option. πŸ•°οΈ
  • log.color β€” output colors. Supports the same values as the --color option. 🌸

✨ FORMATS ✨

okay so bestie, there are several built-in formats, and you can also emit data in a custom format format:<string>. here's the whole menu πŸ“

oneline

<change id> <event type> <project name>:<change name> <title line>

this one is designed to be as compact as possible. periodt. πŸ’…

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>
bestie, this one is for the parsers: 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. no cap ✨

format:<string>

the format:<string> format lets you specify which information you want to show. it works a little bit like printf format and a little like Git log format. for example, this format:

format:The committer of %h was %{name}c%vThe title was >>%s<<%v

would 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 $prefix prefixed 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"
  • %v β€” vertical 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. 🫢


source bestie: sqitch-log(3pm), from perl v5.40.1, dated 2026-07-26. go log something iconic, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from