Payara Server 192 (full) - Is it possible to switch logging to SLF4J?

195 views
Skip to first unread message

Michael Norman

unread,
Jun 3, 2019, 9:16:21 AM6/3/19
to Payara Forum
I found some notes on how to do this for version ~184 - can it be done for 192?

Thanks in advance,
---

Professor Mike Norman

Algonquin College of Applied Arts and Technology,

School of Advanced Technology

ICT  - Applications and Programming 
1385 Woodroffe Avenue
Ottawa, On., K2G 1V8

eduard...@gmail.com

unread,
Jun 3, 2019, 9:45:12 AM6/3/19
to Michael Norman, Payara Forum
Using another logging implementation like log4j or logback can be done,
this is a good starting point for reading I think:
https://blog.payara.fish/the-basics-of-logging-in-payara-server.

Our applications use slf4j and slf4j-jdk14 to connect to payara logging
service, runs fine.

Bye, Eduard
> --
> You received this message because you are subscribed to the Google
> Groups "Payara Forum" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to payara-forum...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/payara-forum/90b8f240-4dc3-449a-bbad-34be5257303f%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
signature.asc

Michael Norman

unread,
Jun 3, 2019, 11:53:53 AM6/3/19
to Payara Forum
By 'switch logging', I meant 'configure the Payara server itself so that its logging used SLF4J', not 'use SLF4J inside of my app' 

Eduard Drenth

unread,
Jun 3, 2019, 8:20:05 PM6/3/19
to Payara Forum
Yes I did realize that, but why would you want a server to be using a logging abstraction?

Op maandag 3 juni 2019 17:53:53 UTC+2 schreef Michael Norman:

Rudy De Busscher

unread,
Jun 4, 2019, 8:25:31 AM6/4/19
to Payara Forum
Hi Michael,

If the switch of logging worked for version 5.184, it should still work for 5.192 (since there are no real changes performed within the Logging service of Payara)

If you encounter an issue, can you report the problem here or as Github Issue. However, as Eduard mentioned, most users aren't modifying how the server logging is written and use something like `filebeat` if the log files needs to be centralised.

Regards
Rudy

Ondro Mihályi

unread,
Jul 5, 2019, 6:23:00 PM7/5/19
to Payara Forum
Hi,

It's possible that on 5.192 you hit the know issue with the ext library folder not working out of the box. To switch the logging engine of Payara Server, the alternative logging library (slf4j, log4j) needs to be placed on the Payara Server isntance class path, so for example dropped into the lib/ext folder in the domain. For this to work in 5.192, due to a bug, you need to specify the java.ext.dirs property to point to this directory explicitly. More details in the release notes: https://docs.payara.fish/release-notes/release-notes-192.html (Known issues) This should be fixed in 5.193.

Ondro
Reply all
Reply to author
Forward
0 new messages