Re: [geb-user] logging for Geb 4.0 and Selenium 4.0.0-beta-2

2021-05-08 Thread thokari

Hi Marcin,
this is exactly what I figured, and had explained to my coworkers almost 
word for word, also pointing to the transitive dependency.

Thanks for the update!

Am 08.05.2021 21:35 schrieb Marcin Erdmann:

On Friday, April 30, 2021 at 9:10:44 AM UTC+2 thok...@gmail.com wrote:


Not sure if I am facing the same issue, but with update to Geb 4.0,
and
subsequent fine-tuning of logging dependencies
(removing SLF4J-Implementation), we would get a lot of logging
output,
because Logback, which is pulled in by Geb,
apparently logs at DEBUG level by default.

I solved this problem for us, by creating a basic logback.xml
configuration file, setting the"root level" to INFO.

Cheers,
Thomas


Yes, logback has unintentionally leaked as a dependency of Geb 4.0. It
was never a conscious decision to include it - in my opinion libraries
should not bring SLF4J implementations (like logback) and it should
always be up to consumer to select one if they so wish. In Geb's case
logback is a transitive dependency of org.jodd:jodd-lagarto. This has
been rectified in Geb 4.1 and logback is no longer a dependency - it's
excluded from org.jodd:jodd-lagarto transitive dependencies in Geb's
pom file.

On Fri, Apr 30, 2021 at 9:17 AM medv...@gmail.com 
wrote:


great, thank you!

I set this as you wrote, traffic log entries do not appear anymore,
but why is this

_LoggingPreferences logPrefs = new LoggingPreferences()_
logPrefs.enable(LogType.BROWSER, Level.ALL)
logPrefs.enable(LogType.CLIENT, Level.SEVERE)
logPrefs.enable(LogType.DRIVER, Level.SEVERE)
logPrefs.enable(LogType.PERFORMANCE, Level.ALL)
logPrefs.enable(LogType.SERVER, Level.SEVERE)
caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs)

ignored at all?

where does this need to be set?


These are two separate things. Logback, on which Thomas has picked up,
is used on the client side (inside of your test JVM) and the traffic
log entires are made by Selenium in your tests. The configuration that
you are using is for logging inside of the browser and if you want
these logs logged on the client side then you actually need to
retrieve as shown in the SO answer at
https://stackoverflow.com/a/25431419/1856764 [1] and then log it.

 --
 You received this message because you are subscribed to the Google
Groups "Geb User Mailing List" group.
 To unsubscribe from this group and stop receiving emails from it,
send an email to geb-user+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
https://groups.google.com/d/msgid/geb-user/CA%2B52dQQJixHtzw7X53hC_j8ffwD_YzxopUUUXh9QPDqizhDf4w%40mail.gmail.com
[2].


Links:
--
[1] https://stackoverflow.com/a/25431419/1856764
[2]
https://groups.google.com/d/msgid/geb-user/CA%2B52dQQJixHtzw7X53hC_j8ffwD_YzxopUUUXh9QPDqizhDf4w%40mail.gmail.com?utm_medium=email_source=footer


--
You received this message because you are subscribed to the Google Groups "Geb User 
Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to geb-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/eef352593480bff1195f2e30c98c4864%40posteo.de.


Re: [geb-user] logging for Geb 4.0 and Selenium 4.0.0-beta-2

2021-05-08 Thread Marcin Erdmann
On Friday, April 30, 2021 at 9:10:44 AM UTC+2 thok...@gmail.com wrote:

> Not sure if I am facing the same issue, but with update to Geb 4.0, and
> subsequent fine-tuning of logging dependencies
> (removing SLF4J-Implementation), we would get a lot of logging output,
> because Logback, which is pulled in by Geb,
> apparently logs at DEBUG level by default.
>
> I solved this problem for us, by creating a basic logback.xml
> configuration file, setting the"root level" to INFO.
>
> Cheers,
> Thomas


Yes, logback has unintentionally leaked as a dependency of Geb 4.0. It was
never a conscious decision to include it - in my opinion libraries should
not bring SLF4J implementations (like logback) and it should always be up
to consumer to select one if they so wish. In Geb's case logback is a
transitive dependency of org.jodd:jodd-lagarto. This has been rectified in
Geb 4.1 and logback is no longer a dependency - it's excluded
from org.jodd:jodd-lagarto transitive dependencies in Geb's pom file.

On Fri, Apr 30, 2021 at 9:17 AM medv...@gmail.com 
wrote:

> great, thank you!
>
> I set this as you wrote, traffic log entries do not appear anymore, but
> why is this
>
> *LoggingPreferences logPrefs = new LoggingPreferences()*
>
>
>
>
>
> *logPrefs.enable(LogType.BROWSER,
> Level.ALL)logPrefs.enable(LogType.CLIENT,
> Level.SEVERE)logPrefs.enable(LogType.DRIVER,
> Level.SEVERE)logPrefs.enable(LogType.PERFORMANCE,
> Level.ALL)logPrefs.enable(LogType.SERVER,
> Level.SEVERE)caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs)*
>
> ignored at all?
>
> where does this need to be set?
>

These are two separate things. Logback, on which Thomas has picked up, is
used on the client side (inside of your test JVM) and the traffic log
entires are made by Selenium in your tests. The configuration that you are
using is for logging inside of the browser and if you want these logs
logged on the client side then you actually need to retrieve as shown in
the SO answer at https://stackoverflow.com/a/25431419/1856764 and then log
it.

-- 
You received this message because you are subscribed to the Google Groups "Geb 
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to geb-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/CA%2B52dQQJixHtzw7X53hC_j8ffwD_YzxopUUUXh9QPDqizhDf4w%40mail.gmail.com.


Re: [geb-user] logging for Geb 4.0 and Selenium 4.0.0-beta-2

2021-04-30 Thread medv...@gmail.com
great, thank you!

I set this as you wrote, traffic log entries do not appear anymore, but why 
is this

*LoggingPreferences logPrefs = new LoggingPreferences()*





*logPrefs.enable(LogType.BROWSER, Level.ALL)logPrefs.enable(LogType.CLIENT, 
Level.SEVERE)logPrefs.enable(LogType.DRIVER, 
Level.SEVERE)logPrefs.enable(LogType.PERFORMANCE, 
Level.ALL)logPrefs.enable(LogType.SERVER, 
Level.SEVERE)caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs)*

ignored at all?

where does this need to be set?

*We then use the following code in a geb.report.Reporter implementation to 
extract these logs:*
*reportState.browser.config.driver.manage().logs().get(LogType.BROWSER).all*

On Friday, April 30, 2021 at 9:59:48 AM UTC+2 Thomas Hirsch wrote:

> Create a file src/test/resources/logback.xml, with this content:
>
> 
> 
>
> 
> %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - 
> %msg%n
> 
> 
> 
> 
> 
> 
>
>
>
>
> On Friday, April 30, 2021 at 9:34:13 AM UTC+2 medv...@gmail.com wrote:
>
>> hi Thomas,
>>
>> exactly, somewhere DEBUG level is set and only traffic log entries 
>> appear, huge amount of them, making logs useless and setting the following 
>> in GebConfig
>>
>>
>> *LoggingPreferences logPrefs = new LoggingPreferences()*
>>
>>
>>
>>
>>
>> *logPrefs.enable(LogType.BROWSER, 
>> Level.ALL)logPrefs.enable(LogType.CLIENT, 
>> Level.SEVERE)logPrefs.enable(LogType.DRIVER, 
>> Level.SEVERE)logPrefs.enable(LogType.PERFORMANCE, 
>> Level.ALL)logPrefs.enable(LogType.SERVER, 
>> Level.SEVERE)caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs)*
>>
>> is not considered or used at all.
>>
>> where is DEBUG set and where exactly did you create the mentioned 
>> logback.xml?
>> could you please post details of the file content too?
>>
>> after setting this do you get selenium's logs?
>>
>> thank you!
>>
>>
>> On Friday, April 30, 2021 at 9:10:44 AM UTC+2 thok...@gmail.com wrote:
>>
>>> Not sure if I am facing the same issue, but with update to Geb 4.0, and 
>>> subsequent fine-tuning of logging dependencies 
>>> (removing SLF4J-Implementation), we would get a lot of logging output, 
>>> because Logback, which is pulled in by Geb, 
>>> apparently logs at DEBUG level by default. 
>>>
>>> I solved this problem for us, by creating a basic logback.xml 
>>> configuration file, setting the"root level" to INFO. 
>>>
>>> Cheers, 
>>> Thomas 
>>>
>>>
>>> Am 29.04.2021 22:01 schrieb Marcin Erdmann: 
>>> > Hi, 
>>> > 
>>> > This is more of a Selenium question than a Geb question, to be honest, 
>>> > you might be provided with better support in a Selenium specific 
>>> > channel. This also might be driver/browser specific. 
>>> > 
>>> > FWIW, this is what we successfully use in our GebConfig.groovy file on 
>>> > my project for capturing javascript console logging with Chrome and 
>>> > Selenium 3.14.0: 
>>> > 
>>> > def capabilities = DesiredCapabilities.chrome() 
>>> > def logPrefs = new LoggingPreferences() 
>>> > logPrefs.enable(BROWSER, Level.INFO) 
>>> > capabilities.setCapability(LOGGING_PREFS, logPrefs) 
>>> > 
>>> > def driver = new ChromeDriver(capabilities) 
>>> > 
>>> > We then use the following code in a geb.report.Reporter implementation 
>>> > to extract these logs: 
>>> > 
>>> > 
>>> reportState.browser.config.driver.manage().logs().get(LogType.BROWSER).all 
>>> > 
>>> > On Tue, Apr 27, 2021 at 11:44 AM medv...@gmail.com 
>>> >  wrote: 
>>> > 
>>> >> hi, 
>>> >> do you know how and where to configure logging for logging for Geb 
>>> >> 4.0 and Selenium 4.0.0-beta-2? 
>>> >> 
>>> >> I set the following in GebConfig 
>>> >> 
>>> >> LoggingPreferences logPrefs = new LoggingPreferences() 
>>> >> logPrefs.enable(LogType.BROWSER, Level.FINE) 
>>> >> logPrefs.enable(LogType.PERFORMANCE, Level.INFO) 
>>> >> caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs) 
>>> >> 
>>> >> and I get only traffic logs, everything is logged there, so many 
>>> >> traffic logs nothing else can be seen. 
>>> >> 
>>> >> how do I set logging to get chrome console logs and "usual" logs 
>>> >> (which show how the script behaves)? 
>>> >> 
>>> >> thank you! 
>>> >> 
>>> >> -- 
>>> >> You received this message because you are subscribed to the Google 
>>> >> Groups "Geb User Mailing List" group. 
>>> >> To unsubscribe from this group and stop receiving emails from it, 
>>> >> send an email to geb-user+u...@googlegroups.com. 
>>> >> To view this discussion on the web visit 
>>> >> 
>>> > 
>>> https://groups.google.com/d/msgid/geb-user/f5a0cd40-21de-4cd3-966e-105f70beeb14n%40googlegroups.com
>>>  
>>> >> [1]. 
>>> > 
>>> > -- 
>>> > You received this message because you are subscribed to the Google 
>>> > Groups "Geb User Mailing List" group. 
>>> > To unsubscribe from this group and stop receiving emails from it, 
>>> > send an email to geb-user+u...@googlegroups.com. 
>>> > To view this discussion on the web visit 
>>> > 
>>> 

Re: [geb-user] logging for Geb 4.0 and Selenium 4.0.0-beta-2

2021-04-30 Thread Thomas Hirsch
Create a file src/test/resources/logback.xml, with this content:



   

%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - 
%msg%n










On Friday, April 30, 2021 at 9:34:13 AM UTC+2 medv...@gmail.com wrote:

> hi Thomas,
>
> exactly, somewhere DEBUG level is set and only traffic log entries appear, 
> huge amount of them, making logs useless and setting the following in 
> GebConfig
>
>
> *LoggingPreferences logPrefs = new LoggingPreferences()*
>
>
>
>
>
> *logPrefs.enable(LogType.BROWSER, 
> Level.ALL)logPrefs.enable(LogType.CLIENT, 
> Level.SEVERE)logPrefs.enable(LogType.DRIVER, 
> Level.SEVERE)logPrefs.enable(LogType.PERFORMANCE, 
> Level.ALL)logPrefs.enable(LogType.SERVER, 
> Level.SEVERE)caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs)*
>
> is not considered or used at all.
>
> where is DEBUG set and where exactly did you create the mentioned 
> logback.xml?
> could you please post details of the file content too?
>
> after setting this do you get selenium's logs?
>
> thank you!
>
>
> On Friday, April 30, 2021 at 9:10:44 AM UTC+2 thok...@gmail.com wrote:
>
>> Not sure if I am facing the same issue, but with update to Geb 4.0, and 
>> subsequent fine-tuning of logging dependencies 
>> (removing SLF4J-Implementation), we would get a lot of logging output, 
>> because Logback, which is pulled in by Geb, 
>> apparently logs at DEBUG level by default. 
>>
>> I solved this problem for us, by creating a basic logback.xml 
>> configuration file, setting the"root level" to INFO. 
>>
>> Cheers, 
>> Thomas 
>>
>>
>> Am 29.04.2021 22:01 schrieb Marcin Erdmann: 
>> > Hi, 
>> > 
>> > This is more of a Selenium question than a Geb question, to be honest, 
>> > you might be provided with better support in a Selenium specific 
>> > channel. This also might be driver/browser specific. 
>> > 
>> > FWIW, this is what we successfully use in our GebConfig.groovy file on 
>> > my project for capturing javascript console logging with Chrome and 
>> > Selenium 3.14.0: 
>> > 
>> > def capabilities = DesiredCapabilities.chrome() 
>> > def logPrefs = new LoggingPreferences() 
>> > logPrefs.enable(BROWSER, Level.INFO) 
>> > capabilities.setCapability(LOGGING_PREFS, logPrefs) 
>> > 
>> > def driver = new ChromeDriver(capabilities) 
>> > 
>> > We then use the following code in a geb.report.Reporter implementation 
>> > to extract these logs: 
>> > 
>> > 
>> reportState.browser.config.driver.manage().logs().get(LogType.BROWSER).all 
>> > 
>> > On Tue, Apr 27, 2021 at 11:44 AM medv...@gmail.com 
>> >  wrote: 
>> > 
>> >> hi, 
>> >> do you know how and where to configure logging for logging for Geb 
>> >> 4.0 and Selenium 4.0.0-beta-2? 
>> >> 
>> >> I set the following in GebConfig 
>> >> 
>> >> LoggingPreferences logPrefs = new LoggingPreferences() 
>> >> logPrefs.enable(LogType.BROWSER, Level.FINE) 
>> >> logPrefs.enable(LogType.PERFORMANCE, Level.INFO) 
>> >> caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs) 
>> >> 
>> >> and I get only traffic logs, everything is logged there, so many 
>> >> traffic logs nothing else can be seen. 
>> >> 
>> >> how do I set logging to get chrome console logs and "usual" logs 
>> >> (which show how the script behaves)? 
>> >> 
>> >> thank you! 
>> >> 
>> >> -- 
>> >> You received this message because you are subscribed to the Google 
>> >> Groups "Geb User Mailing List" group. 
>> >> To unsubscribe from this group and stop receiving emails from it, 
>> >> send an email to geb-user+u...@googlegroups.com. 
>> >> To view this discussion on the web visit 
>> >> 
>> > 
>> https://groups.google.com/d/msgid/geb-user/f5a0cd40-21de-4cd3-966e-105f70beeb14n%40googlegroups.com
>>  
>> >> [1]. 
>> > 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> > Groups "Geb User Mailing List" group. 
>> > To unsubscribe from this group and stop receiving emails from it, 
>> > send an email to geb-user+u...@googlegroups.com. 
>> > To view this discussion on the web visit 
>> > 
>> https://groups.google.com/d/msgid/geb-user/CA%2B52dQTXqJ1guqNNm2wMMyo1q%3D_5xO_D9EwzWAKAg5ApCmZo4g%40mail.gmail.com
>>  
>> > [2]. 
>> > 
>> > 
>> > Links: 
>> > -- 
>> > [1] 
>> > 
>> https://groups.google.com/d/msgid/geb-user/f5a0cd40-21de-4cd3-966e-105f70beeb14n%40googlegroups.com?utm_medium=emailutm_source=footer
>>  
>> > [2] 
>> > 
>> https://groups.google.com/d/msgid/geb-user/CA%2B52dQTXqJ1guqNNm2wMMyo1q%3D_5xO_D9EwzWAKAg5ApCmZo4g%40mail.gmail.com?utm_medium=email_source=footer
>>  
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Geb 
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to geb-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/bb54b028-211f-4cc6-97f0-9b34aad69ca1n%40googlegroups.com.


Re: [geb-user] logging for Geb 4.0 and Selenium 4.0.0-beta-2

2021-04-30 Thread Thomas Hirsch
See also this output:

✗ ./gradlew dependencyInsight --dependency=logback --configuratio
n=testRuntimeClasspath

> Task :dependencyInsight
ch.qos.logback:logback-classic:1.2.3
   variant "runtime" [
  org.gradle.status  = release (not requested)
  org.gradle.usage   = java-runtime
  org.gradle.libraryelements = jar
  org.gradle.category= library

  Requested attributes not found in the selected variant:
 org.gradle.dependency.bundling = external
 org.jetbrains.kotlin.platform.type = jvm
 org.gradle.jvm.version = 11
   ]
   Selection reasons:
  - Was requested : didn't match versions 1.3.0-alpha5, 1.3.0-alpha4, 
1.3.0-alpha3, 1.3.0-alpha2, 1.3.0-alpha1, 1.3.0-alpha0

ch.qos.logback:logback-classic:[1.2,1.3) -> 1.2.3
\--- org.jodd:jodd-log:5.1.5
 \--- org.jodd:jodd-lagarto:5.1.5
  \--- org.gebish:geb-core:4.0
   \--- org.gebish:geb-spock:4.0
\--- testRuntimeClasspath

ch.qos.logback:logback-core:1.2.3
   variant "runtime" [
  org.gradle.status  = release (not requested)
  org.gradle.usage   = java-runtime
  org.gradle.libraryelements = jar
  org.gradle.category= library

  Requested attributes not found in the selected variant:
 org.gradle.dependency.bundling = external
 org.jetbrains.kotlin.platform.type = jvm
 org.gradle.jvm.version = 11
   ]

ch.qos.logback:logback-core:1.2.3
\--- ch.qos.logback:logback-classic:1.2.3
 \--- org.jodd:jodd-log:5.1.5 (requested 
ch.qos.logback:logback-classic:[1.2,1.3))
  \--- org.jodd:jodd-lagarto:5.1.5
   \--- org.gebish:geb-core:4.0
\--- org.gebish:geb-spock:4.0
 \--- testRuntimeClasspath

A web-based, searchable dependency report is available by adding the --scan 
option.

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed

On Friday, April 30, 2021 at 9:10:44 AM UTC+2 thok...@gmail.com wrote:

> Not sure if I am facing the same issue, but with update to Geb 4.0, and 
> subsequent fine-tuning of logging dependencies
> (removing SLF4J-Implementation), we would get a lot of logging output, 
> because Logback, which is pulled in by Geb,
> apparently logs at DEBUG level by default.
>
> I solved this problem for us, by creating a basic logback.xml 
> configuration file, setting the"root level" to INFO.
>
> Cheers,
> Thomas
>
>
> Am 29.04.2021 22:01 schrieb Marcin Erdmann:
> > Hi,
> > 
> > This is more of a Selenium question than a Geb question, to be honest,
> > you might be provided with better support in a Selenium specific
> > channel. This also might be driver/browser specific.
> > 
> > FWIW, this is what we successfully use in our GebConfig.groovy file on
> > my project for capturing javascript console logging with Chrome and
> > Selenium 3.14.0:
> > 
> > def capabilities = DesiredCapabilities.chrome()
> > def logPrefs = new LoggingPreferences()
> > logPrefs.enable(BROWSER, Level.INFO)
> > capabilities.setCapability(LOGGING_PREFS, logPrefs)
> > 
> > def driver = new ChromeDriver(capabilities)
> > 
> > We then use the following code in a geb.report.Reporter implementation
> > to extract these logs:
> > 
> > 
> reportState.browser.config.driver.manage().logs().get(LogType.BROWSER).all
> > 
> > On Tue, Apr 27, 2021 at 11:44 AM medv...@gmail.com
> >  wrote:
> > 
> >> hi,
> >> do you know how and where to configure logging for logging for Geb
> >> 4.0 and Selenium 4.0.0-beta-2?
> >> 
> >> I set the following in GebConfig
> >> 
> >> LoggingPreferences logPrefs = new LoggingPreferences()
> >> logPrefs.enable(LogType.BROWSER, Level.FINE)
> >> logPrefs.enable(LogType.PERFORMANCE, Level.INFO)
> >> caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs)
> >> 
> >> and I get only traffic logs, everything is logged there, so many
> >> traffic logs nothing else can be seen.
> >> 
> >> how do I set logging to get chrome console logs and "usual" logs
> >> (which show how the script behaves)?
> >> 
> >> thank you!
> >> 
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Geb User Mailing List" group.
> >> To unsubscribe from this group and stop receiving emails from it,
> >> send an email to geb-user+u...@googlegroups.com.
> >> To view this discussion on the web visit
> >> 
> > 
> https://groups.google.com/d/msgid/geb-user/f5a0cd40-21de-4cd3-966e-105f70beeb14n%40googlegroups.com
> >> [1].
> > 
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Geb User Mailing List" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an email to geb-user+u...@googlegroups.com.
> > To view this discussion on the web visit
> > 
> https://groups.google.com/d/msgid/geb-user/CA%2B52dQTXqJ1guqNNm2wMMyo1q%3D_5xO_D9EwzWAKAg5ApCmZo4g%40mail.gmail.com
> > 

Re: [geb-user] logging for Geb 4.0 and Selenium 4.0.0-beta-2

2021-04-30 Thread medv...@gmail.com
hi Thomas,

exactly, somewhere DEBUG level is set and only traffic log entries appear, 
huge amount of them, making logs useless and setting the following in 
GebConfig







*LoggingPreferences logPrefs = new 
LoggingPreferences()logPrefs.enable(LogType.BROWSER, 
Level.ALL)logPrefs.enable(LogType.CLIENT, 
Level.SEVERE)logPrefs.enable(LogType.DRIVER, 
Level.SEVERE)logPrefs.enable(LogType.PERFORMANCE, 
Level.ALL)logPrefs.enable(LogType.SERVER, 
Level.SEVERE)caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs)*

is not considered or used at all.

where is DEBUG set and where exactly did you create the mentioned 
logback.xml?
could you please post details of the file content too?

after setting this do you get selenium's logs?

thank you!


On Friday, April 30, 2021 at 9:10:44 AM UTC+2 thok...@gmail.com wrote:

> Not sure if I am facing the same issue, but with update to Geb 4.0, and 
> subsequent fine-tuning of logging dependencies
> (removing SLF4J-Implementation), we would get a lot of logging output, 
> because Logback, which is pulled in by Geb,
> apparently logs at DEBUG level by default.
>
> I solved this problem for us, by creating a basic logback.xml 
> configuration file, setting the"root level" to INFO.
>
> Cheers,
> Thomas
>
>
> Am 29.04.2021 22:01 schrieb Marcin Erdmann:
> > Hi,
> > 
> > This is more of a Selenium question than a Geb question, to be honest,
> > you might be provided with better support in a Selenium specific
> > channel. This also might be driver/browser specific.
> > 
> > FWIW, this is what we successfully use in our GebConfig.groovy file on
> > my project for capturing javascript console logging with Chrome and
> > Selenium 3.14.0:
> > 
> > def capabilities = DesiredCapabilities.chrome()
> > def logPrefs = new LoggingPreferences()
> > logPrefs.enable(BROWSER, Level.INFO)
> > capabilities.setCapability(LOGGING_PREFS, logPrefs)
> > 
> > def driver = new ChromeDriver(capabilities)
> > 
> > We then use the following code in a geb.report.Reporter implementation
> > to extract these logs:
> > 
> > 
> reportState.browser.config.driver.manage().logs().get(LogType.BROWSER).all
> > 
> > On Tue, Apr 27, 2021 at 11:44 AM medv...@gmail.com
> >  wrote:
> > 
> >> hi,
> >> do you know how and where to configure logging for logging for Geb
> >> 4.0 and Selenium 4.0.0-beta-2?
> >> 
> >> I set the following in GebConfig
> >> 
> >> LoggingPreferences logPrefs = new LoggingPreferences()
> >> logPrefs.enable(LogType.BROWSER, Level.FINE)
> >> logPrefs.enable(LogType.PERFORMANCE, Level.INFO)
> >> caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs)
> >> 
> >> and I get only traffic logs, everything is logged there, so many
> >> traffic logs nothing else can be seen.
> >> 
> >> how do I set logging to get chrome console logs and "usual" logs
> >> (which show how the script behaves)?
> >> 
> >> thank you!
> >> 
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Geb User Mailing List" group.
> >> To unsubscribe from this group and stop receiving emails from it,
> >> send an email to geb-user+u...@googlegroups.com.
> >> To view this discussion on the web visit
> >> 
> > 
> https://groups.google.com/d/msgid/geb-user/f5a0cd40-21de-4cd3-966e-105f70beeb14n%40googlegroups.com
> >> [1].
> > 
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Geb User Mailing List" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an email to geb-user+u...@googlegroups.com.
> > To view this discussion on the web visit
> > 
> https://groups.google.com/d/msgid/geb-user/CA%2B52dQTXqJ1guqNNm2wMMyo1q%3D_5xO_D9EwzWAKAg5ApCmZo4g%40mail.gmail.com
> > [2].
> > 
> > 
> > Links:
> > --
> > [1]
> > 
> https://groups.google.com/d/msgid/geb-user/f5a0cd40-21de-4cd3-966e-105f70beeb14n%40googlegroups.com?utm_medium=emailutm_source=footer
> > [2]
> > 
> https://groups.google.com/d/msgid/geb-user/CA%2B52dQTXqJ1guqNNm2wMMyo1q%3D_5xO_D9EwzWAKAg5ApCmZo4g%40mail.gmail.com?utm_medium=email_source=footer
>

-- 
You received this message because you are subscribed to the Google Groups "Geb 
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to geb-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/b69a500d-5d6e-495f-a85b-7445cdebbb57n%40googlegroups.com.


Re: [geb-user] logging for Geb 4.0 and Selenium 4.0.0-beta-2

2021-04-30 Thread thokari
Not sure if I am facing the same issue, but with update to Geb 4.0, and 
subsequent fine-tuning of logging dependencies
(removing SLF4J-Implementation), we would get a lot of logging output, 
because Logback, which is pulled in by Geb,

apparently logs at DEBUG level by default.

I solved this problem for us, by creating a basic logback.xml 
configuration file, setting the"root level" to INFO.


Cheers,
Thomas


Am 29.04.2021 22:01 schrieb Marcin Erdmann:

Hi,

This is more of a Selenium question than a Geb question, to be honest,
you might be provided with better support in a Selenium specific
channel. This also might be driver/browser specific.

FWIW, this is what we successfully use in our GebConfig.groovy file on
my project for capturing javascript console logging with Chrome and
Selenium 3.14.0:

def capabilities = DesiredCapabilities.chrome()
def logPrefs = new LoggingPreferences()
logPrefs.enable(BROWSER, Level.INFO)
capabilities.setCapability(LOGGING_PREFS, logPrefs)

def driver = new ChromeDriver(capabilities)

We then use the following code in a geb.report.Reporter implementation
to extract these logs:

reportState.browser.config.driver.manage().logs().get(LogType.BROWSER).all

On Tue, Apr 27, 2021 at 11:44 AM medv...@gmail.com
 wrote:


hi,
do you know how and where to configure logging for logging for Geb
4.0 and Selenium 4.0.0-beta-2?

I set the following in GebConfig

LoggingPreferences logPrefs = new LoggingPreferences()
logPrefs.enable(LogType.BROWSER, Level.FINE)
logPrefs.enable(LogType.PERFORMANCE, Level.INFO)
caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs)

and I get only traffic logs, everything is logged there, so many
traffic logs nothing else can be seen.

how do I set logging to get chrome console logs and "usual" logs
(which show how the script behaves)?

thank you!

--
You received this message because you are subscribed to the Google
Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to geb-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit


https://groups.google.com/d/msgid/geb-user/f5a0cd40-21de-4cd3-966e-105f70beeb14n%40googlegroups.com

[1].


 --
 You received this message because you are subscribed to the Google
Groups "Geb User Mailing List" group.
 To unsubscribe from this group and stop receiving emails from it,
send an email to geb-user+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
https://groups.google.com/d/msgid/geb-user/CA%2B52dQTXqJ1guqNNm2wMMyo1q%3D_5xO_D9EwzWAKAg5ApCmZo4g%40mail.gmail.com
[2].


Links:
--
[1]
https://groups.google.com/d/msgid/geb-user/f5a0cd40-21de-4cd3-966e-105f70beeb14n%40googlegroups.com?utm_medium=emailutm_source=footer
[2]
https://groups.google.com/d/msgid/geb-user/CA%2B52dQTXqJ1guqNNm2wMMyo1q%3D_5xO_D9EwzWAKAg5ApCmZo4g%40mail.gmail.com?utm_medium=email_source=footer


--
You received this message because you are subscribed to the Google Groups "Geb User 
Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to geb-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/1ed03a9088a001015622fe75e44a9ba7%40posteo.de.


Re: [geb-user] logging for Geb 4.0 and Selenium 4.0.0-beta-2

2021-04-29 Thread Marcin Erdmann
Hi,

This is more of a Selenium question than a Geb question, to be honest, you
might be provided with better support in a Selenium specific channel. This
also might be driver/browser specific.

FWIW, this is what we successfully use in our GebConfig.groovy file on my
project for capturing javascript console logging with Chrome and Selenium
3.14.0:

def capabilities = DesiredCapabilities.chrome()
def logPrefs = new LoggingPreferences()
logPrefs.enable(BROWSER, Level.INFO)
capabilities.setCapability(LOGGING_PREFS, logPrefs)

def driver = new ChromeDriver(capabilities)

We then use the following code in a geb.report.Reporter implementation to
extract these logs:

reportState.browser.config.driver.manage().logs().get(LogType.BROWSER).all

On Tue, Apr 27, 2021 at 11:44 AM medv...@gmail.com 
wrote:

> hi,
> do you know how and where to configure logging for logging for Geb 4.0 and
> Selenium 4.0.0-beta-2?
>
> I set the following in GebConfig
>
>
>
>
>
> *LoggingPreferences logPrefs = new
> LoggingPreferences()logPrefs.enable(LogType.BROWSER,
> Level.FINE)logPrefs.enable(LogType.PERFORMANCE,
> Level.INFO)caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs)*
>
> and I get only traffic logs, everything is logged there, so many traffic
> logs nothing else can be seen.
>
> how do I set logging to get chrome console logs and "usual" logs (which
> show how the script behaves)?
>
> thank you!
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Geb User Mailing List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to geb-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/geb-user/f5a0cd40-21de-4cd3-966e-105f70beeb14n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups "Geb 
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to geb-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/CA%2B52dQTXqJ1guqNNm2wMMyo1q%3D_5xO_D9EwzWAKAg5ApCmZo4g%40mail.gmail.com.


[geb-user] logging for Geb 4.0 and Selenium 4.0.0-beta-2

2021-04-27 Thread medv...@gmail.com
hi,
do you know how and where to configure logging for logging for Geb 4.0 and 
Selenium 4.0.0-beta-2?

I set the following in GebConfig
 




*LoggingPreferences logPrefs = new 
LoggingPreferences()logPrefs.enable(LogType.BROWSER, 
Level.FINE)logPrefs.enable(LogType.PERFORMANCE, 
Level.INFO)caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs)*

and I get only traffic logs, everything is logged there, so many traffic 
logs nothing else can be seen.

how do I set logging to get chrome console logs and "usual" logs (which 
show how the script behaves)?

thank you!



-- 
You received this message because you are subscribed to the Google Groups "Geb 
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to geb-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/f5a0cd40-21de-4cd3-966e-105f70beeb14n%40googlegroups.com.