Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Option to set logging format #23

Merged
merged 2 commits into from
May 8, 2018
Merged

Option to set logging format #23

merged 2 commits into from
May 8, 2018

Conversation

romank0
Copy link
Contributor

@romank0 romank0 commented May 8, 2018

Default option is changed to include time and thread name.
Thread name is useful as client can set test name in it so that instead
of:

    DEBUG:SST:Writing to textfield u'id_password' with text 'selenium'
    DEBUG:SST:Check text wrote correctly
    DEBUG:SST:Clicking element u'login-main-form'
    DEBUG:SST:Waiting for 'get_element'
    INFO:SST:Step 5: Tester2 verifies that both tasks appear under his home task tab.

log looks like:

    2018-05-08 20:49:07,499 test_home_tasks_tab DEBUG:SST:Writing to textfield u'id_password' with text 'selenium'
    2018-05-08 20:49:07,602 test_home_tasks_tab DEBUG:SST:Check text wrote correctly
    2018-05-08 20:49:07,617 test_home_tasks_tab DEBUG:SST:Clicking element u'login-main-form'
    2018-05-08 20:49:08,909 test_home_tasks_tab DEBUG:SST:Waiting for 'get_element'
    2018-05-08 20:49:08,957 test_home_tasks_tab INFO:SST:Step 5: Tester2 verifies that both tasks appear under his home task tab.

This is especially helpful when multiple tests are run concurrently and log to console.

romank0 added 2 commits May 8, 2018 20:58
Default option is changed to include time and thread name.
Thread name is useful as client can set test name in it so that instead
of:

```
    DEBUG:SST:Writing to textfield u'id_password' with text 'selenium'
    DEBUG:SST:Check text wrote correctly
    DEBUG:SST:Clicking element u'login-main-form'
    DEBUG:SST:Waiting for 'get_element'
    INFO:SST:Step 5: Tester2 verifies that both tasks appear under his home task tab.
```

Looks like:
```
    2018-05-08 20:49:07,499 test_home_tasks_tab DEBUG:SST:Writing to textfield u'id_password' with text 'selenium'
    2018-05-08 20:49:07,602 test_home_tasks_tab DEBUG:SST:Check text wrote correctly
    2018-05-08 20:49:07,617 test_home_tasks_tab DEBUG:SST:Clicking element u'login-main-form'
    2018-05-08 20:49:08,909 test_home_tasks_tab DEBUG:SST:Waiting for 'get_element'
    2018-05-08 20:49:08,957 test_home_tasks_tab INFO:SST:Step 5: Tester2 verifies that both tasks appear under his home task tab.
```

This is especially helpful when multiple tests are run concurrently and log to console.
@romank0 romank0 requested a review from holmars May 8, 2018 19:00
@holmars holmars merged commit 558ba68 into master May 8, 2018
@holmars holmars deleted the master-log-format branch May 8, 2018 19:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants