eclipse.log.level in Eclipse RCP config.ini file not working? - eclipse-plugin

I am using service Logger (workbench Logger) to log in Eclipse RCP.
I have used it many locations where it is used for logging INFO, WARNING and ERROR as well.
I had set eclipse.log.level = ERROR in the launch configuration (tab) of the product file. Now I expect it to log only ERROR logs in the log file.
But when I am launching from the product file it is logging all the INFO logs also. My understanding is wrong on eclipse.log.level? or anything else has to be done?

Since this is a system property you set it with
-Declipse.log.level=ERROR
in the 'VM arguments' section of the 'Arguments' tab on the launch configuration.

Related

Geb/Spock Error- No reports dir has been configured, you need to set in the config file or via the build adapter

I have trouble running my functional test from IntelliJ IDE. When I run the functional test, I got the following error message:
java.lang.IllegalStateException: No reports dir has been configured, you need to set in the config file or via the build adapter.
at geb.Browser.getReportGroupDir(Browser.groovy:899)
at geb.Browser.cleanReportGroupDir(Browser.groovy:932)
at geb.spock.GebSpec.methodMissing(GebSpec.groovy:56)
at geb.spock.GebReportingSpec.setupSpec(GebReportingSpec.groovy:37)
Based on my research, all I need to do is to add the following code in GebConfig.groovy:
reportsDir = new File("target/runtime_reports_dir")
I added the line to GebConfig.groovy and rebuild the project, but still running into the same issue. Is there any other fix to this error?
Adding reportsDir = 'target/geb-reports' to your GebConfig shoud fix this, can you show me your GebConfig file?
There is also another fix for it, your test class extends GebReportingSpec, you can chage it to GebSpec and it should also work.
I had this same issue, while having the reportsDir correctly configured in the GebConfig
Adding the resources folder (where my GebConfig is located) as "Test Sources Root" did the trick for me
To mark the folder as "Test Sources Root":
Right click in the folder
Mark Directory as
Test Sources Root
Happy testing!

Intellij IDEA event log file location

I have got information in Event log that 08:54:02 Unable to import maven project: See logs for details
Where I can find this logs file in Intellij IDEA 15CE ?
You can reach the event logs directory from Help - Show Log in Explorer/Finder

Gradle TestListener logging

I've written a GradleTestListener (implements org.gradle.api.tasks.testing.TestListener) and registered this in build.gradle:
test { addTestListener(new com.abcd.GradleTestAdaptor()) }
This test listener uses a third party library which is printing a warning + stacktrace via Slf4J to the console. This is causing a lot of noise in the test output so I would like to suppress it. I have configured Slf4j & Log4J as dependencies on my project and placed log4j.xml with root level error in src/test/resources. The warning is still being printed so it appears my logging configuration is not being picked up.
I'm wondering, as the TestListener is part of the build (akin to a plugin), will it pick up my logging configuration? If not, make it so?

remove msbuild console warning but keep warning in log file

I am building VC++ project using msbuild in batch file. I get about 1500 of same type of warnings (C4554). When running on a build server, i want that warning not be displayed on console window but they be logged in log file.
I have tried couple of methods like
call %MSBuildToolsPathVS%/msbuild %SolFilePath% /p:configuration=debug;WarningLevel=0;Platform=x64^
/flp:LogFile=%MSBuildLogPath%;Verbosity=normal^
or even this
call %MSBuildToolsPathVS%/msbuild %SolFilePath% /p:configuration=debug;WarningLevel=0;Platform=x64^
/clp:Summary^
/flp:LogFile=%MSBuildLogPath%;Verbosity=normal^
or
call %MSBuildToolsPathVS%/msbuild %SolFilePath% /p:configuration=debug;Platform=x64;WarningLevel=0;RunCodeAnalysis=false^
/clp:Summary^
/flp:LogFile=%MSBuildLogPath%;Verbosity=normal^
still displays the warning on console.
call %MSBuildToolsPathVS%/msbuild %SolFilePath% /p:configuration=debug;Platform=x64^
/clp:ErrorsOnly^
/flp:LogFile=%MSBuildLogPath%;Verbosity=normal^
/t:rebuild
causes log file to display warnings correctly but the console now hides the warnings but it also dosn't show usual steps of what configuration is being build, the target that is built etc, which is the information I want.
Any solutions?
sedy

How to set the mandatory properties sources for Sonar in Jenkins

Hello I've a problem with the configuration of jenkins in order to use the plugin of Sonar.
I've set the properties into the file sonar-project.properties, that looks like the following code:
pom.groupId=groupID
pom.artifactId=artifactID
sonar.sourceEncoding=iso-8859-15
sonar.java.target=1.5
sonar.java.source=1.5
sonar.projectKey=projectkey
sonar.projectName= projectname
sonar.projectVersion=1.0.0
While I'm trying to do the building I got the following error in the console of Jenkins:
Exception in thread "main" org.sonar.runner.RunnerException: You must define mandatory properties: sources
at org.sonar.runner.Runner.checkMandatoryProperties(Runner.java:92)
at org.sonar.runner.Runner.execute(Runner.java:75)
at org.sonar.runner.Main.main(Main.java:61)
Build step '**** custom Sonar analysis' marked build as failure
Finished: FAILURE
Do you have any suggestion? Where do I set this properties?
Thanks in advance.
"sonar.sources" property is mandatory: it tells SonarQube where your source files are located.
Everything is explained in the online documentation:
Analysis Parameters
How to run an analysis with SonarQube Runner