playwright
playwright copied to clipboard
[Feature] Logging support on the language bindings
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.
👍 from me
+1 Would be really helpful to have this feature, so that I may redirect the logs from stdout to a file.
Nearly 40 :+1:, hope this feature gets a second look
+1
+1
+1
+1
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.
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
Loggerapi, by setting aDEBUGenvironment 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.
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.