Skip to content
This repository was archived by the owner on Jul 11, 2019. It is now read-only.
This repository was archived by the owner on Jul 11, 2019. It is now read-only.

Could this be used in an async function? #5

@skullz03

Description

@skullz03

Hi,

I am trying to use this library the way it is described here:- https://stackoverflow.com/questions/42020911/i-am-finding-trouble-using-log4js-protractor-appender
for my protractor-cucumber-typescript framework. And I have remodeled the appenders as per this article:https://stackoverflow.com/questions/45153599/error-with-log4js-configuration-must-have-a-property-appenders-of-type-object/45167568#45167568

Here is how I am using the logger in my step defs

    Given(/^I am on the Google site for "(.*?)"$/, async (text) => {
        await toplinks.navigate_SearchImages();
        let textUI = await toplinks.getText_Search();  
        browser.logger.info("This is what I am looking for");        
        await expect(textUI).equal('Feeling Lucky');
    });

When the code runs this does not print out anything in the console or in the file. 1) Can this library be used with async functions 2) Am I using it the right way 3) Could someone please add an example for protractor in documentation?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions