playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Feature] Logging support on the language bindings

Open kumaraditya303 opened this issue 4 years ago • 7 comments

Currently, playwright when in debug mode logs output to stdout directly, while this is great, it is impossible to customise logging from the logger of the language being used like, if user is using python logging module then playwright cannot log with logging module, for java users would like to use sl4j for logging etc.

If playwright passes log output with rpc then each language can customise it by itself.

Consider upvoting :+1: if you want to use logging from your playwright supported language.

kumaraditya303 avatar May 08 '21 05:05 kumaraditya303

👍 from me

amittendulkar avatar May 09 '21 14:05 amittendulkar

+1 Would be really helpful to have this feature, so that I may redirect the logs from stdout to a file.

murtaza1415 avatar Jun 10 '22 09:06 murtaza1415

Nearly 40 :+1:, hope this feature gets a second look

Mattwmaster58 avatar Jan 14 '23 01:01 Mattwmaster58

+1

philippeg-ligo avatar Dec 01 '23 22:12 philippeg-ligo

+1

wencan avatar Jan 08 '24 09:01 wencan

+1

rcastellotti avatar Jul 10 '24 15:07 rcastellotti

+1

sgupta38 avatar Aug 26 '24 09:08 sgupta38

If you are looking for logs to be able to debug, we recommend many other ways of debugging. Here is a python debugging guide, and there are similar ones for other languages. For example, you can get more logs than are available through the Logger api, by setting a DEBUG environment variable, as explained here.

dgozman avatar Sep 25 '24 19:09 dgozman

If you are looking for logs to be able to debug, we recommend many other ways of debugging. Here is a python debugging guide, and there are similar ones for other languages. For example, you can get more logs than are available through the Logger api, by setting a DEBUG environment variable, as explained here.

The ask here is for playwright users to be able to customize the logs that are enabled by the DEBUG variable using the logging library of their choice, just like they can with regular playwright logs. For example, many people need to add their own timestamps, or report their logs to somewhere other than stdout.

nate-selzer avatar Sep 25 '24 22:09 nate-selzer

Would be great if we could redirect these logs to a specific file. Helpful to avoid cluttering stderr/stdout and uploading as a build artifact when debugging CI failures.

iloveitaly avatar Dec 10 '24 15:12 iloveitaly