GCLOUD_PREVIEW_APP_MODULES_GET-LOGS(1)

NAME

gcloud preview app modules get-logs - gets the logs for the given module

SYNOPSIS

gcloud preview app modules get-logs MODULE [OUTPUT_FILE] --version VERSION [--append] [--days DAYS] [--details] [--end-date END_DATE] [--severity SEVERITY] [--vhost VHOST] [GLOBAL-FLAG ...]

DESCRIPTION
(PREVIEW) This command gets the logs for the given module. Logs will be downloaded to the file given as OUTPUT_FILE. If not provided, the logs will be printed to standard output. You can append new logs to an existing downloaded log file by using the --append flag.

POSITIONAL ARGUMENTS
MODULE
    The module to get the logs for.
[OUTPUT_FILE]
    The file to write the logs to. If "-" or if not given, logs are printed to standard out.

REQUIRED FLAGS
--version VERSION
    The version of the app that you want to operate on.

OPTIONAL FLAGS
--append
    Append the logs to an existing file.
--days DAYS
    The number of days worth of logs to get. Use 0 for all available logs; default is 1 day. This option cannot be used with --append mode. Append mode will get all logs since logs were last retrieved.
--details
    Include all available data in each log line. Use --no-details to disable.
--end-date END_DATE
    End date (as YYYY-MM-DD) of period for log data. Defaults to today.
--severity SEVERITY
    The severity of app level logs to get. If not given, only request logs are returned.
--vhost VHOST
    Only return log messages from this virtual host. Defaults to all virtual hosts.

GLOBAL FLAGS
Run $ gcloud help for a description of flags available to all commands.

EXAMPLES
To download and print the last day's worth of request logs for a module, run:
    $ gcloud preview app modules get-logs mymodule --version=1
By default, this will get only request logs (not application level logs). To get your application level logs at a given severity level and higher, use the --severity flag:
    $ gcloud preview app modules get-logs mymodule --version=1 \
        --severity=debug
Logs can be saved to a file instead of being printed to standard out by specifying a file name:
    $ gcloud preview app modules get-logs mymodule --version=1 \
        ~/log_file.txt
You can append new logs to a previously downloaded log file by using --append mode:
    $ gcloud preview app modules get-logs mymodule --version=1 \
        ~/log_file.txt --append
To download all available logs (not just the last day's worth), run:
    $ gcloud preview app modules get-logs mymodule --version=1 \
        ~/log_file.txt --days=0

NOTES
This command is currently in DEVELOPER PREVIEW and may change without notice.