All Questions
20 questions
2
votes
0
answers
38
views
Gradle does not see log field through @Log4j2 annotation inside lombok in InteliJ
I have a class
@Log4j2
public class TestClass {
public void doSmth() {
log.info("doSmth");
}
}
When I try to compile my code using gradle (tap on "assemble" button ...
2
votes
1
answer
154
views
Can't get log4j to work in a program that doesn't have public static void main(Strng[] args) method
I'm developing a synchronous application for Creo Parametric.
I've decided to log the outputs of my application with log4j but I just can't get it to work. App.log file is made automatically when I ...
0
votes
1
answer
435
views
How to set log level to 'debug' when app is started in debug mode (IntelliJ)
When starting the app normally print only log.info(...) into the console. When starting the app in debug mode print log.info(...) and log.debug(...).
Can I set the debug level without reading system ...
2
votes
0
answers
89
views
Log4j & Kotlin - "Type Mismatch. Required: Message!, Found: String"
My code is the following:
val logger = LogManager.getLogger()
logger.info { "some message" }
however, IntelliJ is reporting the following error:
Type Mismatch.
Required: Message!
Found: ...
0
votes
0
answers
2k
views
Log4j appender plugin "ERROR StatusLogger Unrecognized format specifier" when run from an executable jar
I am using IntelliJ IDEA and Maven. I am making a server application in JavaFX and wanted to use Log4j to display logs in the server console. When compiling the program in the IDE, everything works as ...
1
vote
1
answer
12k
views
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". I am not able to understand what does this mean [duplicate]
I am reading a simple Excel File, the code presumably has no errors in Main.java, I have added the following dependencies in the pom.xml file. I have seen the same problem everywhere, some still are ...
0
votes
1
answer
591
views
log4j2 log file is not generating
the log file is generated when I run the code within IDE (Intellij IDEA).
as soon as I create runnable jar of the code and then try to run the jar then the logs are not generating.
I have made sure ...
0
votes
1
answer
122
views
Files in my resources directory are not being copied to classes dir using IntelliJ debug
This is my project.
The second image is my modules
When i build to run in debug the log4j2.properties is not being copied to the target-->classes directory, so the app can not find it
is there ...
1
vote
1
answer
3k
views
How to import the latest log4j2 from maven in intellij-idea
How can I import the latest log4j2 from maven in intellij-idea?
At the time of writing, it's 2.11.2 and it is not in the list when I search for it.
I've searched for 'org.apache.logging.log4j' and '2....
1
vote
1
answer
1k
views
Creating a log4j2 Logger causes retrieval of JNDI naming context to fail when starting Tomcat webapp
I have a Java 7 webapp I'm trying to get working on a server running Tomcat 7.0.53. Before trying to use Log4j, my webapp has been able to start and run with no problems.
Now, I'm trying to add and ...
2
votes
2
answers
4k
views
Log4j2 configuration not found with Intellij and Kotlin
I built a fresh IntelliJ project with Gradle and the Kotlin DSL build script, only Kotlin (Java) and java version 10.0.2 as project SDK.
I added the dependencies for log4j into build.gradle.kts:
...
0
votes
1
answer
157
views
Log4j message object unexpectedly rendered after source step in IntelliJ
While debugging some Java code (Log4J 2.5), I'm seeing a weird behaviour which I'm not able to reason.
In the process of rendering a Log4J log message, an object of Log4jLogEvent is constructed:
...
0
votes
1
answer
1k
views
how to make log files to be generated at the same location as jar file
I am using jsch channelexec to call .sh file. The content of .sh file is,
#!/bin/bash
java -jar /xxx/yyy.war
In my log file, I mentioned the path as
./logs/xxx.log
when I run the ap in intellij,...
0
votes
1
answer
1k
views
log4j.xml file on classpath but cannot be detected by log4j
I am trying to set up log4j in a simple Java project. I keep getting the following message when running my project.
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: ...
11
votes
2
answers
16k
views
Lombok @Log4j2 annotation doesn't work in IntelliJ IDEA [duplicate]
I'm using Lombok library in my project and have a problem with @Log4j2 annotation. Not sure why but it's not generating log field in the class.
But when I'm changing annotation to @Slf4j it works, I ...
2
votes
1
answer
2k
views
log4j2.xml VM options "No log4j2 configuration file found"
I've used log4j2 for quite a while and being at classpath it worked fine. But now I decided to move it to VM options with -Dlog4j.configuration= and it's a disaster. There's tonns of WARN and finally ...
2
votes
1
answer
1k
views
None of my log4j configuration changes have any effect on output. (In IntelliJ)
I'm trying to setup a "hello world" style class to spit hello out to some logs, using IntelliJ IDEA Community 2016.1, JDK 1.8, and log4j 2.5. I've tried both .properties files and programmatic ...
2
votes
0
answers
1k
views
Converter category plugin not included in log4j2 plugins dat file in Jar
First a bit of background of what I'm trying to do. My employer is moving from Windows servers, using C#, to Java on Linux to migrate to AWS. This particular issue came up trying to create a Log ...
0
votes
0
answers
2k
views
Unable to access file:log4j.properties, but have told Maven to use only log4j2
I'm getting this message:
ERROR StatusLogger Unable to access file:log4j.properties
java.io.FileNotFoundException: log4j.properties (No such file or
directory)... (+ stacktrace)
...despite ...
0
votes
1
answer
2k
views
How to include resources in IntelliJ Gradle JavaFx project?
I am building a JavaFx project in IntelliJ using the Gradle project structure and a JavaFx Gradle plugin:
Gradle JavaFx Plugin
I was wondering how to include resource files on the classpath. ...