Skip to content

Commit

Permalink
collect-logs: update default output file to pro_logs.tar.gz
Browse files Browse the repository at this point in the history
Fixes: #2849
  • Loading branch information
dheyay authored and orndorffgrant committed Mar 14, 2024
1 parent 5e42dde commit daa8ba1
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions debian/po/pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -1664,8 +1664,8 @@ msgid "Collect logs and relevant system information into a tarball."
msgstr "Coleta logs e outras informações relevantes do sistema em um tarball."

#: ../../uaclient/messages/__init__.py:898
msgid "tarball where the logs will be stored. (Defaults to ./ua_logs.tar.gz)"
msgstr "tarball onde os logs serão guardados. (Valor padrão ./ua_logs.tar.gz)"
msgid "tarball where the logs will be stored. (Defaults to ./pro_logs.tar.gz)"
msgstr "tarball onde os logs serão guardados. (Valor padrão ./pro_logs.tar.gz)"

#: ../../uaclient/messages/__init__.py:901
msgid "Show customizable configuration settings"
Expand Down
2 changes: 1 addition & 1 deletion debian/po/ubuntu-pro.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ msgid "Collect logs and relevant system information into a tarball."
msgstr ""

#: ../../uaclient/messages/__init__.py:898
msgid "tarball where the logs will be stored. (Defaults to ./ua_logs.tar.gz)"
msgid "tarball where the logs will be stored. (Defaults to ./pro_logs.tar.gz)"
msgstr ""

#: ../../uaclient/messages/__init__.py:901
Expand Down
8 changes: 4 additions & 4 deletions features/collect_logs.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Feature: Command behaviour when attached to an Ubuntu Pro subscription
When I run `touch /var/log/ubuntu-advantage.log.1` with sudo
When I run `touch /var/log/ubuntu-advantage.log.2.gz` with sudo
When I run `pro collect-logs` as non-root
Then I verify that files exist matching `ua_logs.tar.gz`
When I run `tar zxf ua_logs.tar.gz` with sudo
Then I verify that files exist matching `pro_logs.tar.gz`
When I run `tar zxf pro_logs.tar.gz` with sudo
Then I verify that files exist matching `logs/`
When I run `sh -c "ls -1 logs/ | sort -d"` as non-root
# On Xenial, the return value for inexistent services is the same as for dead ones (3).
Expand Down Expand Up @@ -53,8 +53,8 @@ Feature: Command behaviour when attached to an Ubuntu Pro subscription
When I run `touch /var/log/ubuntu-advantage.log.1` with sudo
When I run `touch /var/log/ubuntu-advantage.log.2.gz` with sudo
When I run `pro collect-logs` as non-root
Then I verify that files exist matching `ua_logs.tar.gz`
When I run `tar zxf ua_logs.tar.gz` as non-root
Then I verify that files exist matching `pro_logs.tar.gz`
When I run `tar zxf pro_logs.tar.gz` as non-root
Then I verify that files exist matching `logs/`
When I run `sh -c "ls -1 logs/ | sort -d"` as non-root
# On Xenial, the return value for inexistent services is the same as for dead ones (3).
Expand Down
4 changes: 2 additions & 2 deletions features/logs.feature
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ Feature: Logs in Json Array Formatter
Given a `<release>` `<machine_type>` machine with ubuntu-advantage-tools installed
When i verify that running `pro status` `with sudo` exits `0`
And I verify that running `pro collect-logs` `with sudo` exits `0`
And I run `tar -tf ua_logs.tar.gz` as non-root
And I run `tar -tf pro_logs.tar.gz` as non-root
Then stdout does not contain substring
"""
user0.log
"""
When i verify that running `pro status` `as non-root` exits `0`
And I verify that running `pro collect-logs` `with sudo` exits `0`
And I run `tar -tf ua_logs.tar.gz` as non-root
And I run `tar -tf pro_logs.tar.gz` as non-root
Then stdout contains substring
"""
user0.log
Expand Down
2 changes: 1 addition & 1 deletion uaclient/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

STATUS_FORMATS = ["tabular", "json", "yaml"]

UA_COLLECT_LOGS_FILE = "ua_logs.tar.gz"
UA_COLLECT_LOGS_FILE = "pro_logs.tar.gz"

event = event_logger.get_event_logger()
LOG = logging.getLogger(util.replace_top_level_logger_name(__name__))
Expand Down
2 changes: 1 addition & 1 deletion uaclient/cli/tests/test_cli_collect_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
tarball where the logs will be stored. \(Defaults to
./ua_logs.tar.gz\)
./pro_logs.tar.gz\)
""" # noqa
)

Expand Down
2 changes: 1 addition & 1 deletion uaclient/messages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ class TxtColor:
"Collect logs and relevant system information into a tarball."
)
CLI_COLLECT_LOGS_OUTPUT = t.gettext(
"tarball where the logs will be stored. (Defaults to " "./ua_logs.tar.gz)"
"tarball where the logs will be stored. (Defaults to " "./pro_logs.tar.gz)"
)

CLI_CONFIG_SHOW_DESC = t.gettext("Show customizable configuration settings")
Expand Down
2 changes: 1 addition & 1 deletion ubuntu-advantage.1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The exit code can be:
Create a tarball with all relevant logs and debug data.

The \fI--output\fR parameter defines the path to the tarball. If not
provided, the file is saved as \fBua_logs.tar.gz\fP in the current
provided, the file is saved as \fBpro_logs.tar.gz\fP in the current
directory.

.TP
Expand Down

0 comments on commit daa8ba1

Please sign in to comment.