Christian Klugesherz

Ranch Hand
+ Follow
since Nov 21, 2016
Cows and Likes
Cows
Total received
3
In last 30 days
0
Total given
0
Likes
Total received
8
Received in last 30 days
0
Total given
7
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Christian Klugesherz

Sure that:

Has no more sense here :-)
Finally I improved.
Basis, is to declare only console in .xml configuration, then to add File appender through programming
This is really useful because the declaration the logger can be kept as "private static final"

AND also to adapt the destination of the log file
Here ago the codes






RESULT

--------- Path of the Log File : D:\Users\kluges1\AppData\Roaming\Pac-Tool
--------- All Declared Appenders {Console=Console, LogFile=LogFile}
Read the Appenders Activate in the Logger
-------- Is Logger Console active --> true
-------- Is Logger File active --> false
--------- Log Level (default in .xml) = INFO
22:18:41.865 ERROR log4j.Log4j2Config - This is Logger for 1 Error
22:18:41.867 INFO  log4j.Log4j2Config - This is Logger for 1 Info
Read the Appenders Activate in the Logger
-------- Is Logger Console active --> true
-------- Is Logger File active --> false
Remove Console Logger
Remove Console Logger
-------- Is Logger Console active --> false
-------- Is Logger File active --> false
Add Console Logger
Add Console Logger
-------- Is Logger Console active --> true
-------- Is Logger File active --> false
Add File Logger
Add LogFile Logger
-------- Is Logger Console active --> true
-------- Is Logger File active --> true
22:18:41.868 ERROR log4j.Log4j2Config - This is Logger 3 Error
22:18:41.868 INFO  log4j.Log4j2Config - This is Logger 3 Info
Before to Set Log Level = INFO
Log Level = TRACE
Log Level = TRACE
22:18:41.869 ERROR log4j.Log4j2Config - This is Logger 4 Error
22:18:41.869 INFO  log4j.Log4j2Config - This is Logger 4 Info
22:18:41.869 DEBUG log4j.Log4j2Config - This is Logger 4 Debug
22:18:41.869 TRACE log4j.Log4j2Config - This is Logger 4 Trace



Finally I got it




with


Hello

There is now some days that I'm spending on java logger: log4j2
I have read several times the doc.
The approach is relatively easy if you decide to work on the basis with an .xml file.
But in case you want to create the configuration and adapt through java, it is a bit more complicated.

Below the code I could manage for now.
I didn't succeed to reconfigure the log level
Each time  depth is stopping on error level

2017-03-15 23:24:27,248 [main] ERROR: This is Logger for 1 Error
2017-03-15 23:24:27,256 [main] ERROR: This is Logger 1 Error

Can you please help to specify how to reload the programmed log4j2 configuration  ?



Many thanks

Christian

Finally solution was to use setComposite
10 months ago
Hello

The goal is to apply a transparency on an image with a slider
Slider modifying the value : alphaBlurBkgdImg between [0.0,  1.0]

This is working well  in Win7
Unfortunately when I run the same code on Win10, I’m not able to see the background image

On Win10, when I comment the following,

Background image appears, but of course, no possibility to blur :-(

Do you see any explanations what could be wrong here ?

Many thanks in advance

Christian



10 months ago
Many, many many thanks to all.

Understood, and fixed.



Topic closed.

Merci !
10 months ago
But I want to bundle my .html file (like the .png file) in my jar file in order to use getResource
Unfortunately I don't see how to proceed

Can you please provide some guidance to do that ?
I'm really stuck here.
Thanks in advance

Certainly I'm searching on the wrong place
I don't know what is wrong in my (Eclipse) "java build path" where all the files under /src should be included
Again why it is working with .png and not with .htlm (even if I might understand that eclipse will automatically bundle .png)

Again many thanks for your patience and help for a clear explanation and guidance

Merci
10 months ago
Not working :-(
The operation above, moved Abreviation.htm file to "Referenced Library"
By sense I changed code


but creation of jar is no more possible, certainly due to !
10 months ago
Hello Tony,

Many thanks for this clear clarification.
Now I understood.
So by default, Eclipse will bundle in the jar:
  automatically all images *.png files so (PAC-Tool_16.png)
  and not *.html so not Abreviation.html
even there is no indication that "packages" gui.images and gui.html will be bundled in jar
See picture below

For your information: Abreviation.html will never change (it is like and user guide which is linked to a release, so fix file)

So to fix I have in Eclipse :
to right-click on Abreviation.html and "Build path" --> "add to build path"

10 months ago
Sorry,

Is this not what I'm done in Eclipse through java build path.
Sorry to ask, I'm really not see how to fix

Thanks for your help

10 months ago
Please could you clarify how to fix ?
10 months ago
I'm sorry I didn't catch.

In eclipse project it is the case.
See the Java Build Path : classpath folder.

Why


--> is not working


--> working


Thanks
10 months ago