Skip to content

Filter out unnecessary PTF logs when calling the ptfadapter plugin#1828

Merged
wangxin merged 1 commit intosonic-net:masterfrom
wangxin:filter-ptf-logs
Jul 1, 2020
Merged

Filter out unnecessary PTF logs when calling the ptfadapter plugin#1828
wangxin merged 1 commit intosonic-net:masterfrom
wangxin:filter-ptf-logs

Conversation

@wangxin
Copy link
Copy Markdown
Collaborator

@wangxin wangxin commented Jun 29, 2020

Description of PR

Summary:
Fixes # (issue)

If use ptfadapter in test script, a debug level log message is generated
for each sent packet. This is unnecessary and could significantly inflate the log
file size. This change grabs the 'dataplane' logger and set its level to warning
in tests/conftest.py.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

To much unnecessary log messages are generated when calling the ptfadapter plugin in test scripts. This PR is to filter out the unnecessary logs.

How did you do it?

Get logger dataplane and set its logging level to warning in tests/conftest.py.

How did you verify/test it?

Test run the acl/test_acl.py script which uses the ptfadapter.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

If use ptfadapter in test script, a debug level log message is generated
for each sent packet. This is unnecessary and could significantly inflate the log
file size. This change grabs the 'dataplane' logger and set its level to warning
in `tests/conftest.py`.

Signed-off-by: Xin Wang <xiwang5@microsoft.com>
@wangxin wangxin requested a review from a team June 29, 2020 08:51
@wangxin wangxin merged commit 927d94a into sonic-net:master Jul 1, 2020
@wangxin wangxin deleted the filter-ptf-logs branch September 24, 2020 02:33
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
a631f04 Add check_db_integrity script to setup.py (sonic-net#1828)
ddf6793 Implement script null_route_helper (sonic-net#1737)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants