gcloud_beta_debug_logpoints_create (1)
NAME
- gcloud beta debug logpoints create - create debug logpoints
SYNOPSIS
-
gcloud beta debug logpoints create LOCATION LOG_FORMAT_STRING [--condition=CONDITION] [--log-level=LOG_LEVEL; default="info"] [--target=(ID|DESCRIPTION_REGEXP)] [--wait=WAIT; default=10] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(BETA) This command adds a debug logpoint to a debug target. Logpoints add
The default lifetime of a logpoint is 24 hours from creation, and the output will go to the standard log for the programming language of the target (java.logging for Java, logging for Python, etc.)
POSITIONAL ARGUMENTS
-
- LOCATION
-
The logpoint location. Locations are of the form FILE:LINE, where FILE can be
simply the file name, or the file name preceded by enough path components to
differentiate it from other files with the same name. It is an error to provide
a file name that is not unique in the debug target.
- LOG_FORMAT_STRING
-
A format string which will be logged every time the logpoint location is
executed. If the string contains curly braces ('{' and '}'), any text within the
curly braces will be interpreted as a run-time expression in the debug target's
language, which will be evaluated when the logpoint is hit.
The value of the expression will then replace the {} expression in the resulting log output. For example, if you specify the format string "a={a}, b={b}", and the logpoint is hit when local variable a is 1 and b is 2, the resulting log output would be "a=1, b=2".
FLAGS
-
- --condition=CONDITION
-
A condition to restrict when the log output is generated. When the logpoint is
hit, the condition will be evaluated, and the log output will be generated only
if the condition is true.
- --log-level=LOG_LEVEL; default="info"
-
The logging level to use when producing the log message. LOG_LEVEL must be
one of: info, warning, error.
- --target=(ID|DESCRIPTION_REGEXP)
-
The debug target. It may be a target ID or name obtained from 'debug targets
list', or it may be a regular expression uniquely specifying a debuggee based on
its description or name. For App Engine projects, if not specified, the default
target is the most recent deployment of the default module and version.
- --wait=WAIT; default=10
-
The number of seconds to wait to ensure that no error is returned from a
debugger agent when creating the logpoint. When a logpoint is created, there
will be a delay before the agents see and apply the logpoint. Until at least one
agent has attempted to enable the logpoint, it cannot be determined if the
logpoint is valid.
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
NOTES
This command is currently in BETA and may change without notice. This variant is also available:
- $ gcloud debug logpoints create