-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log information in seperate line in log4j. #2936
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not clear as to what we are trying to solve via this PR. System.lineSeparator()
merely returns the line separator string that is applicable for the current OS. I believe that character still needs to be consumed in some print statement or a logger for it to be effective no?
Thanks for writing @krmahadevan . I depends on the version of Java we are using in our machine. If it's above 1.7 then it should work out. Else whatever you said needs to be followed by enclosing in some print statement. I'll be pulling another request by making sufficient changed into the existing code and then please do let me know.. |
Do you have a sample that you can share with me, where I can see this in action? I was the under the assumption that the line separator is just a platform neutral way of obtaining the line separator, but you still need to be including it in your print or log statements such as System.out.println(System.lineSeparator()+ "Hello World!"); (or) logger.info("{} SampleMessage", System.lineSeparator()); Without doing either of the above, I don't think that the line separator is going to get automatically added. I will wait for some more inputs from you to u'stand how you are getting it to work |
Yeah I do have a sample in working using line seperator but meanwhile there's one more way to accomplish it. |
@shubhamind08 - In that case I don't think we would be applying this change within TestNG because that can clutter/elongate the TestNG specific logs. I believe that when you already do |
Fixes # .Adding a line after each log message.
Did you remember
CHANGES.txt
./gradlew autostyleApply
We encourage pull requests that:
If your pull request involves fixing SonarQube issues then we would suggest that you please discuss this with the
TestNG-dev before you spend time working on it.
Note: For more information on contribution guidelines please make sure you refer our Contributing section for detailed set of steps.