Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

automation - How to cut webdriver.io log(query DATA part)?

I have a problem with webdriver.io loglevel setting. If I set logLevel: info (or debug or trace) I see all get/post queries. If I set loglevel less verbose (warn/error) I don't see any query. What I want is to cut DATA part of the log to let's say 50 symbols. enter image description here Where to dig for a solution. Should I override a logger or some EventListener class(to implement onPost method and add my custom logging)? If yes, then which one?

question from:https://stackoverflow.com/questions/65935423/how-to-cut-webdriver-io-logquery-data-part

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There is no such option at the moment. You can raise a feature request or pull request to https://github.com/webdriverio/webdriverio

There are some other options that might not work for you as well: set logger level to WARN for webdriver logger or write all logs to file.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...