Skip to main content

log

These are the flags/commands under buck2 log and their --help output:

Commands for interacting with buck2 logs

Usage: buck2-release log [OPTIONS] <COMMAND>

Commands:
  what-ran           Output everything Buck2 ran from selected invocation
  what-failed        Outputs every command that failed in the selected invocation
  path               Output the path to the selected log
  show               Outputs the log in JSON format from selected invocation
  cmd                Show buck command line arguments from selected invocation
  what-up            Show the spans that were open when the log ended
  what-materialized  Outputs materializations from selected invocation
  what-uploaded      Outputs stats about uploads to RE from the selected invocation
  critical-path      Show the critical path for a selected build
  replay             Replay an event log
  show-user          Converts the event log from a selected invocation into a user event log, in
                     JSONL format
  summary            Outputs high level statistics about the build
  diff               Subcommands for diff'ing two buck2 commands
  help               Print this message or the help of the given subcommand(s)

Options:
  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Output everything Buck2 ran from selected invocation.

The output is presented as a series of tab-delimited records with the following structure:

The reason for executing a given command. That's either to build or to test.

The identity of this command. This will include the target that ran required it.

The executor for this command. This will either be RE or local.

Details to reproduce it. For RE, that's the action digest. For local, the command.

To reproduce an action that ran on RE, use the following command then follow the instructions. The
DIGEST is of the form `hash:size`.

frecli cas download-action DIGEST

To reproduce an action that ran locally, make sure your working directory is the project root (if
unsure, use `buck2 root --kind project` to find it), then run the command. The command is already
shell-quoted.

Usage: buck2-release log what-ran [OPTIONS] [PATH]

Arguments:
  [PATH]
          A path to an event-log file to read from

Options:
      --recent <NUMBER>
          Open the event-log file from a recent command

      --trace-id <ID>
          Show log by trace id

      --allow-remote
          This option does nothing

      --no-remote
          Do not allow downloading the log from manifold if it's not found locally

      --format <OUTPUT>
          Which output format to use for this command
          
          [default: tabulated]
          [possible values: tabulated, json, csv]

      --emit-cache-queries
          

      --skip-cache-hits
          

      --skip-remote-executions
          

      --skip-local-executions
          

      --filter-category <FILTER_CATEGORY>
          Regular expression to filter commands by given action category (i.e. type of of actions
          that are similar but operate on different inputs, such as invocations of a C++ compiler
          (whose category would be `cxx_compile`)). Matches by full string

      --failed
          Show only commands that failed

      --incomplete
          Show only commands that were not completed. That is command were running if buck2 process
          was killed, or command currently running if buck2 is running build now

      --show-std-err
          Show also std_err from commands that are run. If the command fails before completing, we
          display "<command did not finish executing>". If it finishes but there is no error, we
          display "<stderr is empty>". Otherwise, std_err is shown. For JSON, we show raw values and
          null for non-completion

      --omit-empty-std-err
          Omit commands if their std_err is empty

  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Outputs every command that failed in the selected invocation.

Look at the help for what-ran to understand the output format.

Usage: buck2-release log what-failed [OPTIONS] [PATH]

Arguments:
  [PATH]
          A path to an event-log file to read from

Options:
      --recent <NUMBER>
          Open the event-log file from a recent command

      --trace-id <ID>
          Show log by trace id

      --allow-remote
          This option does nothing

      --no-remote
          Do not allow downloading the log from manifold if it's not found locally

      --format <OUTPUT>
          Which output format to use for this command
          
          [default: tabulated]
          [possible values: tabulated, json, csv]

      --emit-cache-queries
          

      --skip-cache-hits
          

      --skip-remote-executions
          

      --skip-local-executions
          

      --filter-category <FILTER_CATEGORY>
          Regular expression to filter commands by given action category (i.e. type of of actions
          that are similar but operate on different inputs, such as invocations of a C++ compiler
          (whose category would be `cxx_compile`)). Matches by full string

  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Output the path to the selected log

Usage: buck2-release log path [OPTIONS] [PATH]

Arguments:
  [PATH]
          A path to an event-log file to read from

Options:
      --recent <NUMBER>
          Open the event-log file from a recent command

      --trace-id <ID>
          Show log by trace id

      --allow-remote
          This option does nothing

      --no-remote
          Do not allow downloading the log from manifold if it's not found locally

      --all
          List all the logs

  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Outputs the log in JSON format from selected invocation

Usage: buck2-release log show [OPTIONS] [PATH]

Arguments:
  [PATH]
          A path to an event-log file to read from

Options:
      --recent <NUMBER>
          Open the event-log file from a recent command

      --trace-id <ID>
          Show log by trace id

      --allow-remote
          This option does nothing

      --no-remote
          Do not allow downloading the log from manifold if it's not found locally

  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Show buck command line arguments from selected invocation.

This command output is not machine readable. Robots, please use `buck2 log show`.

Usage: buck2-release log cmd [OPTIONS] [PATH]

Arguments:
  [PATH]
          A path to an event-log file to read from

Options:
      --recent <NUMBER>
          Open the event-log file from a recent command

      --trace-id <ID>
          Show log by trace id

      --allow-remote
          This option does nothing

      --no-remote
          Do not allow downloading the log from manifold if it's not found locally

      --expand
          Show @-expanded command line arguments instead of the original command line

  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Show the spans that were open when the log ended

Usage: buck2-release log what-up [OPTIONS] [PATH]

Arguments:
  [PATH]
          A path to an event-log file to read from

Options:
      --recent <NUMBER>
          Open the event-log file from a recent command

      --trace-id <ID>
          Show log by trace id

      --allow-remote
          This option does nothing

      --no-remote
          Do not allow downloading the log from manifold if it's not found locally

      --after <NUMBER>
          Print the actions that where open after certain amount of milliseconds

  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Outputs materializations from selected invocation.

The output is a tab-separated list containing the path, the materialization method, the file count,
and the total size (after decompression).

Usage: buck2-release log what-materialized [OPTIONS] [PATH]

Arguments:
  [PATH]
          A path to an event-log file to read from

Options:
      --recent <NUMBER>
          Open the event-log file from a recent command

      --trace-id <ID>
          Show log by trace id

      --allow-remote
          This option does nothing

      --no-remote
          Do not allow downloading the log from manifold if it's not found locally

  -s, --sort-by-size
          Sort the output by total bytes in ascending order

      --aggregate-by-ext
          Aggregates the output by file extension

      --format <OUTPUT>
          Which output format to use for this command
          
          [default: tabulated]
          [possible values: tabulated, json, csv]

  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Outputs stats about uploads to RE from the selected invocation

Usage: buck2-release log what-uploaded [OPTIONS] [PATH]

Arguments:
  [PATH]
          A path to an event-log file to read from

Options:
      --recent <NUMBER>
          Open the event-log file from a recent command

      --trace-id <ID>
          Show log by trace id

      --allow-remote
          This option does nothing

      --no-remote
          Do not allow downloading the log from manifold if it's not found locally

      --format <OUTPUT>
          Which output format to use for this command
          
          [default: tabulated]
          [possible values: tabulated, json, csv]

      --aggregate-by-ext
          Aggregates the output by file extension

  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Show the critical path for a selected build.

This produces tab-delimited output listing every node on the critical path.

It includes the kind of node, its name, category and identfier, as well as total duration (runtime
of this node), user duration (duration the user can improve) and potential improvement before this
node stops being on the critical path.

All durations are in microseconds.

Usage: buck2-release log critical-path [OPTIONS] [PATH]

Arguments:
  [PATH]
          A path to an event-log file to read from

Options:
      --recent <NUMBER>
          Open the event-log file from a recent command

      --trace-id <ID>
          Show log by trace id

      --allow-remote
          This option does nothing

      --no-remote
          Do not allow downloading the log from manifold if it's not found locally

      --format <FORMAT>
          Which output format to use for this command
          
          [default: tabulated]
          [possible values: tabulated, json, csv]

  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Replay an event log.

This command allows visualizing an existing event log in a Superconsole.

Usage: buck2-release log replay [OPTIONS] [PATH] [OVERRIDE_ARGS]...

Arguments:
  [PATH]
          A path to an event-log file to read from

  [OVERRIDE_ARGS]...
          Override the arguments

Options:
      --recent <NUMBER>
          Open the event-log file from a recent command

      --trace-id <ID>
          Show log by trace id

      --allow-remote
          This option does nothing

      --no-remote
          Do not allow downloading the log from manifold if it's not found locally

      --speed <NUMBER>
          Control the playback speed using a float (i.e. 0.5, 2, etc)

      --preload
          Preload the event log. This is typically only useful for benchmarking

  -h, --help
          Print help (see a summary with '-h')

Console Options:
      --console <super|simple|...>
          Which console to use for this command
          
          [env: BUCK_CONSOLE=]
          [default: auto]
          [possible values: auto, none, simple, simplenotty, simpletty, super]

      --ui <UI>...
          Configure additional superconsole ui components.
          
          Accepts a comma-separated list of superconsole components to add. Possible values are:
          
          dice - shows information about evaluated dice nodes debugevents - shows information about
          the flow of events from buckd
          
          These components can be turned on/off interactively. Press 'h' for help when superconsole
          is active.

          Possible values:
          - dice
          - debugevents
          - io:          I/O panel
          - re:          RE panel

      --no-interactive-console
          Disable console interactions
          
          [env: BUCK_NO_INTERACTIVE_CONSOLE=]

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Converts the event log from a selected invocation into a user event log, in JSONL format

Usage: buck2-release log show-user [OPTIONS] [PATH]

Arguments:
  [PATH]
          A path to an event-log file to read from

Options:
      --recent <NUMBER>
          Open the event-log file from a recent command

      --trace-id <ID>
          Show log by trace id

      --allow-remote
          This option does nothing

      --no-remote
          Do not allow downloading the log from manifold if it's not found locally

  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Outputs high level statistics about the build

Usage: buck2-release log summary [OPTIONS] [PATH]

Arguments:
  [PATH]
          A path to an event-log file to read from

Options:
      --recent <NUMBER>
          Open the event-log file from a recent command

      --trace-id <ID>
          Show log by trace id

      --allow-remote
          This option does nothing

      --no-remote
          Do not allow downloading the log from manifold if it's not found locally

  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Subcommands for diff'ing two buck2 commands

Usage: buck2-release log diff [OPTIONS] <COMMAND>

Commands:
  action-divergence  Identifies the first divergent action between two builds. Divergence is
                     identified by the same action having differing outputs. Useful for identifying
                     non-determinism
  configs            
  help               Print this message or the help of the given subcommand(s)

Options:
  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Identifies the first divergent action between two builds. Divergence is identified by the same
action having differing outputs. Useful for identifying non-determinism

Usage: buck2-release log diff action-divergence [OPTIONS] <--path1 <PATH1>|--trace-id1 <TRACE_ID1>|--recent1 <NUMBER>> <--path2 <PATH2>|--trace-id2 <TRACE_ID2>|--recent2 <NUMBER>>

Options:
      --path1 <PATH1>
          A path to an event-log file of the first build

      --trace-id1 <TRACE_ID1>
          Trace id of the first build

      --recent1 <NUMBER>
          Open the event-log file from a recent command for the first build

      --path2 <PATH2>
          A path to an event-log file of the second build

      --trace-id2 <TRACE_ID2>
          Trace id of the second build

      --recent2 <NUMBER>
          Open the event-log file from a recent command for the second build

  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets

Usage: buck2-release log diff configs [OPTIONS]

Options:
  -h, --help
          Print help (see a summary with '-h')

Universal Options:
  -v, --verbose <VERBOSITY>
          How verbose buck should be while logging.
          
          Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
          more info about everything; 4 = more info about everything + stderr;
          
          It can be combined with specific log items (stderr, full_failed_command, commands,
          actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
          "-v=1,stderr"
          
          [default: 1]

      --oncall <ONCALL>
          The oncall executing this command

      --client-metadata <CLIENT_METADATA>
          Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
          form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
          datasets