Thanks Mukesh for explaining so beautifully what exactly log files are. As always your explanation is to the point and easy to understand.
@RajdeepBiswasInd9 жыл бұрын
Bohot badhiya barkhuddar!
@Mukeshotwani9 жыл бұрын
+Rajdeep Biswas Thanks Rajdeep Bhai
@rakeshlalsangi52549 жыл бұрын
Excellent and easy explanation Mukesh .......
@Mukeshotwani8 жыл бұрын
Thanks Rakesh
@manueltenorio75439 жыл бұрын
hey, thanks! this was very clear... haha, I didn't have an Idea what the log files were, but I understand they are useful for making software. I need to initialize my log4j system properly because a remote server which I want to access sends the message: "no appenders could be found for logger". Have a great week!
@Mukeshotwani9 жыл бұрын
Manuel Tenorio Hey Manuel Thanks I will recommend please refer extent reports as well. Please refer below tutorial kzbin.info/www/bejne/sITNqJqgi9FnhpY it actually generate logs and pie chart, bar graph and so on.
@jayakumar60919 жыл бұрын
Amazing Explanation thanks a lot Mukesh
@Mukeshotwani9 жыл бұрын
jaya kumar Thanks Jaya :)
@bonker271256 жыл бұрын
hi mukesh , as u have said we are providing class name to this logger instance . so it means its use is also limited to that class only . in that case how to use it in whole framework ? like if i have 20 classes as a part of POM, then in every class i have to create logger instance ? or is there any other way ? please suggest
@Mukeshotwani6 жыл бұрын
Hi Shobhit, Please use extent report in order to use log effectively
@anshulgupta300719908 жыл бұрын
@Mukesh Sir: Just one help. Is there a way where i can assert my log files. For my application logs are generated for every api hit. So i need to assert a string or data in logs while logs are generated for that hit. Currently i am doing it manually. Is there any external jar file which can be used to perform such assertions. Or any other easier way. Thanks in advance!
@monimathur71787 жыл бұрын
Hi Mukesh.Thanks for the Log4j information. Could you please answer like where are we defining the log max size ? That means what would be the maximum capacity a log could handle?
@Mukeshotwani7 жыл бұрын
Hi Moni, Generally, log files will be in KB so 10 MB is enough (depends on System requirement). I use extent report which has advance logs in HTML file. Have a look learn-automation.com/advance-selenium-reporting-with-screenshots-2/
@monimathur71787 жыл бұрын
Thanks Mukesh for the update :)
@Mukeshotwani7 жыл бұрын
Welcome moni try and let me know.
@dipeshlpatel7 жыл бұрын
Hi Mukesh, This is brilliant and works perfectly fine with a chrome browser. However, when we have 5 chrome browser thread and using log4j for parallel testing, it does not show efficient test steps flow for tests due to multi-thread execution. Can you please help by sharing your expertise what changes required for efficient logging in multi-thread environment?
@dipakpardeshi61526 жыл бұрын
hi Mukesh thanks for creating video its very helpfull for me, i performed all step for log4j but after run my program i can see logs in my consol but -> in project directory -> in log folder -> all 2 notepad and 1 html log file are empty, you have any idea where i"m doing mistake.
@Mukeshotwani6 жыл бұрын
Hey Dipak, Seems some version issue. Which version you are using? You can also try extent report which is latest which gives logs in report directly. learn-automation.com/advance-selenium-reporting-with-screenshots-2/
@debajyoti19906 жыл бұрын
Yes, I have faced the same problem. Looking for solutions now..
@debajyoti19906 жыл бұрын
by the way, Thanks a ton Mukesh for the awesome work that you've been doing..
@anilmor36528 жыл бұрын
You are Great bro. :) Thanks for the video.
@Mukeshotwani8 жыл бұрын
Thanks Anil. I am glad to know it helped you
@nikilraj529810 жыл бұрын
Excellent ..thanks...
@Mukeshotwani10 жыл бұрын
Thank Ram
@abhishekvaishnav8 жыл бұрын
I really liked the video and the way you explained things -pretty simple. I have a query _ I need to store some keys for password encryption in logs while doing encryption and also recover the keys from log at time of decryption since I'm using random key encryption. I understood how to store them, but can retrieving them in a program be easy?
@Mukeshotwani8 жыл бұрын
not good in this.
@abhishekvaishnav8 жыл бұрын
no problemo :)
@girinivasmanivasagam39657 жыл бұрын
Hi Mukesh, I'm getting below error while following your steps. I'm able to get logs in CONSOLE, HTML and R. But i'm not able to get the logs for TTCC and I'm getting the below error on execution. What should I do? log4j:ERROR Could not find value for key log4j.appender.TTCC log4j:ERROR Could not instantiate appender named "TTCC".
@Mukeshotwani7 жыл бұрын
Log 4j is missing which is causing the issue.
@girinivasmanivasagam39657 жыл бұрын
Mukesh otwani Thank you
@pranalikumbhare35478 жыл бұрын
Hi..... It necessary to set "log4j.properties" in every program. because, when I didn't t set it , it shows me the warn messages... Please suggest me.....
@Mukeshotwani8 жыл бұрын
Yes Pranali if you dont want warnings.
@nidhigarg49969 жыл бұрын
Hi Mukesh I have started watching your videos since yesterday. These are really very helpful. I am facing an issue. When I go to your blog learn-automation.com and select any item from drop-downs then the contents are not loaded completely. After some contents blank page is displayed. Also I need to implement selenium framework in my project. Can you please help me in that. Like where and how can i store the xpaths for all the web elements, Database connection and reports and batch run etc. Do I need to create only one Java Project in Eclipse for all the scripts in my project or I can create multiple Java projects? Please Reply. Thanks a lot
@Mukeshotwani9 жыл бұрын
+Nidhi Garg Hi Nidhi, I will check my blog theme and thank you for poiting out. I am going to upload framework in upcoming days.
@anuragsngh167 жыл бұрын
Hi Mukesh , I am able to generate logs using log4j API. But logs which are getting generated contains logs of WebDriver & TestNG along with my custom logs. How should I configure so that I can get only my logs. Thanks in advance
@nikitasharma288110 жыл бұрын
its really helpful..thanks sir
@Mukeshotwani10 жыл бұрын
Thanks Nikita
@vipinpandey757 жыл бұрын
Hi Mukesh, Thanks for such wonderful tutorial. I have one query how Can we configure log file in such a way that it will generate a new html file and log file with class name /Testscript name for each execution. ?
@Mukeshotwani7 жыл бұрын
HI Vipin, we use extent report now a days for logs and html report. learn-automation.com/advance-selenium-reporting-with-screenshots-2/
@saifurDYI10 жыл бұрын
Awesome Idea dude
@Mukeshotwani10 жыл бұрын
Thanks Rahman
@abhijitbiradar8 жыл бұрын
Hi Mukesh, Thanks for video. I have a query.can we create a new log file every time using log4j. Means every time when i run program it should create new log file.
@Mukeshotwani8 жыл бұрын
Hey Abhijit, I will suggest use extent report which generates logs in HTML format.
@shankarpk894 жыл бұрын
Hi Mukesh, Can you please help me understand the difference between log4j and webdriver event listener ?
@faisalsakib98106 жыл бұрын
hi , can we use maven repository to have 4j jar ???
@Mukeshotwani6 жыл бұрын
Hi Faisal, Please use below dependency org.apache.logging.log4j log4j-core 2.11.0
@nalinyogeshwarrdwivedi96577 жыл бұрын
Hi Mukesh ...unable to find Log4j.properties file on system..or please guide how to create it as in video you directly showed the file and continued. Thanks
@Mukeshotwani7 жыл бұрын
Hi Nalin, you have to create this file manuall check out my post for this learn-automation.com/how-to-create-log-files-in-selenium/
@nalinyogeshwarrdwivedi96577 жыл бұрын
Thanks Mukesh ...I found the file from blog....added it to the project folder but I am facing "No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies). log4j:WARN Please initialize the log4j system properly" this issue on mac system. Please guide. Thanks.
@davidvasanthraj8 жыл бұрын
Hi Mukesh, Does the .properties file is same for all codes, all it applicable for your example alone
@Mukeshotwani8 жыл бұрын
Hi David it will be applicable to all . I will suggest u to use new logs with report kindly check kzbin.info/www/bejne/mnPNaKOunb-Lnrs
@davidvasanthraj8 жыл бұрын
Thank you.bro...Now it's clear.
@DeepakKumar21057 жыл бұрын
Hi Sir, can you tell us why two log files are generated viz testlog and testlog1.I think only one file should be generated.
@TheSumisri8 жыл бұрын
When I download Apache poi in that log4 jar is available so is it necessary that again I need to download separately
@Mukeshotwani8 жыл бұрын
Yes
@WilsonMar17 жыл бұрын
Are the files shown somewhere downloadable, such as GitHub?
@karthiknamana9 жыл бұрын
I want LogJ4 property file content . where can i get that text in Property file
+karthik namana try this as well kzbin.info/www/bejne/sITNqJqgi9FnhpY
@karthiknamana9 жыл бұрын
thankq +Mukesh otwani . really your blog was awesome . it is very nice
@Mukeshotwani9 жыл бұрын
Thank you karthik.. Keep visiting.. Have a nice weekend
@sakshitiwariskz8 жыл бұрын
yeah i finally got logger thnxs dude :)
@jyshaikh17 жыл бұрын
Hi, Continuously getting java.io.FileNotFoundException: log4j.properties (The system cannot find the file specified) - Look like system is looking for log4j.properties file and not found. Where as it is available under /src folder.
@jyshaikh17 жыл бұрын
Commented out: PropertyConfigurator.configure(" log4j.properties"); And all good.
@shankarashok65995 жыл бұрын
Hi Sir Your videos are damn good. In fact no one can match the intensity of your good. Thanks for all your effort. I have one questions regarding the logs. That is in what way does System.out.println(); differs from logs if we replace syso from log it works in the same way right. Or any difference is there.
@nmshaik96687 жыл бұрын
Hi Tried my self log4g, script will successfully pass and able to generate log folder but that notepad folder showing empty. please tell me mukesh.
@kshirodsahu33917 жыл бұрын
Hi Mukesh, Thanks for such wonderful tutorial. I have one quarry Can we configure log file in such a way that it will generate a new html file and log file with class name /Testscript name for each execution.
@vipinpandey757 жыл бұрын
+mukesh otwani please help me on the same issue.
@gauravshrote40696 жыл бұрын
unable to generate log file for different java classes .only created log for first java class. can you please help.
@SuperMechtronics7 жыл бұрын
Wonderful explanation
@SanatanihinduHinduRashtra8 жыл бұрын
how can i use it android program i need everything what ever is happening in the app in the log files please do help me
@sreyashshukla98276 жыл бұрын
if i have to generate different logger file for passed and failed scenario, how will i do it?
@ashishgawande62355 жыл бұрын
Thank you sir for the brilliant video. I am facing the issue while generating the log file. log file. only the blank log files are getting generated. can you please guide me further.
@sushanthsriram52598 жыл бұрын
Hello Bhaya ji...I have tired with above code but i got an error, and when i removed 3rd line i.e, propertyconfigurator.configre(); i am able to execute the code
@Mukeshotwani8 жыл бұрын
Thanks Sushanth :) Try extent report too its good for advance logs.
@neelamchakraborty90626 жыл бұрын
hi Mukesh where can i find this code for property file.
@Mukeshotwani6 жыл бұрын
Hi Neelam, You can find the code using below link learn-automation.com/how-to-create-log-files-in-selenium/ Instead of using log4j, i would recommend use extent report which internally uses Log4J. learn-automation.com/extent-report-with-selenium-webdriver/
@inMeditation_PSSM8 жыл бұрын
Beautiful way
@SC4K_Online5 жыл бұрын
getLogger moved to LogManager, can you redo this video
@nurshah81610 жыл бұрын
nice work..
@Mukeshotwani10 жыл бұрын
Thanks Nur
@shukrantpatel70244 жыл бұрын
In my project i have followed same procedure which u told in video but still my logs folder is not generating..please solve my query
@Mukeshotwani4 жыл бұрын
Hi Shukrant, extent report has in built logs and report as well learn-automation.com/extent-report-with-selenium-webdriver/
@divyangjani76006 жыл бұрын
what is need of it when we have TestNG?
@Mukeshotwani6 жыл бұрын
Hi Divyang if you need in different format then you can use it.
@Raghu7833 жыл бұрын
Hello Mukesh , please increase your voice little bit loud so that we can hear properly.
@Mukeshotwani3 жыл бұрын
Sorry Raghu that was little old video. In recent videos I have improved voice quality.
@userx4815 жыл бұрын
Mukesh, thank you a lot. I am learning like in a good school from you. Would you know how to add clickable line # in Intelije? I used the same and tried other log4j file content and I am getting this: 0 [main] INFO RandomPractice - Google is launched 17 [main] INFO RandomPractice - Search field is located 143 [main] INFO RandomPractice - Hare Krishna is entered 2126 [main] WARN RandomPractice - Searching for the entered text Whereas I am aiming for getting what you have in the video. I 've heard Inlelije works differently. I have my "log4j.properties" file, may be you can advise what I can add to get the clickable line # or may be there is another way. So far after going to so many blogs, I haven't figured that out. Thank you very much. All the best to you!
@sunkarimounika26964 жыл бұрын
Hello Mukesh,I followed same procedure.Logs are not getting generated can you please guide me log4j:WARN No appenders could be found for logger (baseClasses.BaseClass). log4j:WARN Please initialize the log4j system properly.
@niky01534 жыл бұрын
can u post ur code here?
@beditz15918 ай бұрын
Hi can I paste my code I am not able to generate pls help i am beginner in this field @@niky0153
@blablagswjsvsns1346 жыл бұрын
unable to get configure method in property.configurator. . nothing showing.
@AbhishekMishra-ru2fi8 жыл бұрын
You are just awesome man :) (Y)
@Mukeshotwani8 жыл бұрын
Thanks mate but I would suggest you to continue with advance logs using extent report which is more popular now a days. learn-automation.com/advance-selenium-reporting-with-screenshots-2/
@Bujji282438 жыл бұрын
Ok good explanations, but hot get property file?
@parveentomar54866 жыл бұрын
Sir Kya me apse bat kar skta hu
@thiery5725 жыл бұрын
Thanks.
@Mukeshotwani5 жыл бұрын
Most welcome to my channel
@Mukeshotwani5 жыл бұрын
I can see that you also have channel on youtube. Let me know if any help required for youtube as well.
@thiery5725 жыл бұрын
@@Mukeshotwani Hehe.. okay. Thanks. :)
@dhananjayapattnaik74284 жыл бұрын
Admin user can update the user password Given I am in the HR system with an Admin account When I update password of another user Then I receive a message for updating password successfully And user's password is updated to the new passwo
@amritpalbadhan2057 жыл бұрын
its weird..it seems like its working for everyone except me ..the logs files generated displaying no content and their size is 0kb
@Mukeshotwani7 жыл бұрын
Cheers
@towhidskynet7 жыл бұрын
6:44 - 6:45
@incognito31748 жыл бұрын
unfortunately I did not understand because I do not speak English. Are there someone who can make me a translation? I speak french and arabic!!