Log4j2 logging in Selenium Java Framework using Log4j2 Properties & Log4j2 xml

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • This video tutorial is about #log4j2 with #log4j2.xml and #log4j2.properties file configuration Example. Where you will learn how to get Log4j2 up and running instantaneously with Maven dependencies and also how to log different types of events/logs such as error, warning, info, debug and so on in #selenium #webdriver test scripts and in #seleniumframework using log4j 2 framwork.
    Log4j 2 xml and log4j 2 properties examples: sdetadda.blogs...
    Below are the Playlists in this channel -
    #testng + Selenium 4 Tutorial -2022/2023 🔥🔥🔥 : • TestNG + Selenium 4 Tu...
    #playwright Framework Tutorial - 2023 : • Playwright Framework T...
    #karate Framework Tutorial: • Karate Framework Tutorial
    Top 100 Java programs for programming and coding Interviews: • Top 100 Java programs ...
    Thank you for watching the video 🙏, I hope that you found it informative.
    Don't forget to like 👍, comment 💬, share and subscribe, do press the bell icon 🔔 for the earliest updates of my new videos.
    If you have any doubts regarding the topics that we covered, do tell in the comments section, I will make sure to reply at the earliest.
    Contact me at email : rmishraqa@gmail.com
    #Basic Log4j2 Configuration
    #Configuring Log4j 2
    #log4j2 java
    #log4j logging levels
    #Log4J2 How It Works
    #log4j #seleniumframework
    #Log4j2
    #LoggingFramework
    #Log4j2.properties
    #Log4j2.xml
    #selenium
    #maven
    #SeleniumWebDriver

Комментарии • 33

  • @purvanshvaikunthe2148
    @purvanshvaikunthe2148 Год назад +3

    It almost took 1 hour of mine to fix the issue before watching this.
    Thanks a lot buddy!

  • @rahulbelekar8181
    @rahulbelekar8181 17 дней назад +1

    Thank you... Its work for me....

  • @testing24x7
    @testing24x7 Год назад +3

    It worked. Thanks a lot.

  • @srbmtech
    @srbmtech Год назад +3

    Much awaited it was , thank you!

  • @savinashab8935
    @savinashab8935 Год назад +2

    Wow! Excellent explanation. Thank you.

  • @IAboycando
    @IAboycando Год назад +3

    Thank you.!

  • @debabrataroy3643
    @debabrataroy3643 Год назад +1

    Excellent tutorial video! Thank you. 🙏👍

  • @riyashukla1717
    @riyashukla1717 9 месяцев назад +1

    Very useful 👍

  • @omprakashnaik9136
    @omprakashnaik9136 8 месяцев назад +1

    Thank you so much❤

  • @nikhilbansal1721
    @nikhilbansal1721 11 месяцев назад +2

    Excellent video...in one go it was implemented
    Pls tell one thing. How we can make the value of append as False in properties file ?
    I want a new log file everytime

  • @SachinSharma-fr1vb
    @SachinSharma-fr1vb Год назад +1

    Sir, getting below exception:
    java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled
    at io.netty.util.internal.ReflectionUtil.trySetAccessible(ReflectionUtil.java:31) ~[netty-common-4.1.92.Final.jar:4.1.92.Final]
    using java 17 selenium webdriver 4.10.0 log4j-core and log4j-apr latestversion 2.20
    please help why i am getting this error.

    • @sdetadda
      @sdetadda  Год назад

      Will take a look and revert to you.

  • @RahulMishra-yb8yh
    @RahulMishra-yb8yh Год назад +1

    Please could you share the repository with the solution? thanks!

  • @ParagOak
    @ParagOak Год назад +1

    how to create custom log-manager with this code? can you please create video about this?

  • @user-rp6qn1uk5b
    @user-rp6qn1uk5b Год назад

    I'm using Java project but I'm not able to creat log folder and log file as well. Everything I have written log method is coming under console window only.

  • @factdebuggermind2514
    @factdebuggermind2514 10 месяцев назад

    Hello,
    In my can it is generating the .log file but not adding any logs in the console and vice-versa.
    any solution?

  • @siddabattuniharinadh1371
    @siddabattuniharinadh1371 6 месяцев назад

    How to create log files based on the test case name. Is there any way to pass test case dynamically at the time of running.

  • @ParagOak
    @ParagOak Год назад

    Is there any specific reason to add webdrivermanager dependency? because Selenium 4.6 and above support same lib itself.

  • @Arjun2mkap3929
    @Arjun2mkap3929 Год назад +1

    Why log4j is used for?

    • @sdetadda
      @sdetadda  Год назад +1

      It is used to provide logging functionality and help in debugging the test scripts. Hope it was useful. Please do recommend this channel to your friends and colleagues. Thanks.

  • @ganeshniranjan2003
    @ganeshniranjan2003 8 месяцев назад

    Appender.file.name
    Appender.file.filename
    What is the difference between these
    Could u please explain

  • @Risekhalsa
    @Risekhalsa Год назад +1

    Sir could you please provide code link

    • @sdetadda
      @sdetadda  Год назад

      Will push the code to git or to some common path soon and provide the link in description of this video.

  • @hardeepsinghnegi63
    @hardeepsinghnegi63 9 месяцев назад +1

    no debug info coming :(

    • @sdetadda
      @sdetadda  9 месяцев назад

      Hi, Did you follow all the steps in the video? What exactly are you getting, any error as such?

    • @hardeepsinghnegi63
      @hardeepsinghnegi63 9 месяцев назад +1

      Hi, it's resolved now ..thank you 😊

  • @vikassaini6459
    @vikassaini6459 Год назад

    Itdidn't work for my.. not sure why . here my log4j.xml file






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

    • @amruthashekar3544
      @amruthashekar3544 Год назад +1

      Check where you have added log4j.xml file, if its in separate resource folder not in the src/main/resource then you need to add that resource folder to your project build path, then it will works.I also faced the same issue its resolved now.