11:39, EEST
July 15, 2020
Hello everybody,
I am using the java sdk to connect a java project to an opc-ua server to read data.
It works properly, but the opc-ua sdk logs way too much. Indeed, it logs at DEBUG level.
How can I change the logging level to WARNING? I need to do it programmatically via java.
Thanks in advance for your help.
Regards,
Francesco
12:15, EEST
April 3, 2012
Hi,
The SDK uses SLF4J (http://www.slf4j.org/). That is a facade, that whatever compatible actual logging library then links to. This is to say, configuring that library is outside of the SDK and would depend on what logging library you decided to use in your application.
The samples do use Log4j1, since the SDK is Java 6+ (PubSub editions 8+) and that is basically the only one that works in Java 6. But that is just a sample, typically nowadays most applications use Log4j2 or logback. Thus you should check the documentation of the logging library your application uses. Some of them might have the option to do that at runtime, but that would depend on the lib. And as a note, just to be sure, you cannot change the level of a particular message, but normally you can configure per package or class what level of logging you wish to use. Typically the default is that nothing is logged, unless you specify it to some level, but depends on the lib.
Most Users Ever Online: 1919
Currently Online:
22 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 735
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1