Logger

43 views
Skip to first unread message

vasiliu.ge...@gmail.com

unread,
Jun 20, 2017, 7:42:55 AM6/20/17
to MvvmFX
Is there any way to grab the logger used in mvvmfx ? I would like to redirect it's output to a file so I can set up own logging mechanism.
Also, there are other logs that I was from org.jboss.weld & jandex, I guess they're from the cdi package ( I am using CDI injection in my project), and I would also like to redirect their output to a file instead the console.

Manuel Mauky

unread,
Jun 20, 2017, 10:06:15 AM6/20/17
to MvvmFX, vasiliu.ge...@gmail.com
Hi,
mvvmFX uses SLF4J for it's internal logging. You can configure SLF4J so that it prints the logging output only in a file. Please see the SLF4J documentation of how to setup this. All mvvmFX classes are in subpackages of "de.saxsys.mvvmfx". You can use this info to configure the logger so that it outputs the mvvmFX messages the way you like.

At the moment the mvvmFX-CDI module uses JBoss Weld as implementation for CDI. In our next main release this will be configurable so that you can use every CDI implementation you like.
However, with the current release (1.6.0) you have to use Weld. As far as I know, Weld also uses SLF4J for it's logging. This means that you can configure the logging for Weld in the same way.

I hope this helps you. I'm not that experienced when it comes to logging configuration details so I can't directly help you but I hope the reference to the SLF4J documentation can help you. 

vasiliu.ge...@gmail.com

unread,
Jun 20, 2017, 11:29:17 AM6/20/17
to MvvmFX, vasiliu.ge...@gmail.com

Thank you for the answer. I’ve began the documentation on SLF4J and I am sure I will be able to redirect it ( both on mvvmfx and on the CDI), though it will require a small bit of work. Maybe mvvmfx can be set up with a feature that allows you to easily get logger/disable it/handle it however you want? It’s just a small feature that maybe some other people will be interested in it and might be useful.

Manuel Mauky

unread,
Jun 20, 2017, 4:43:18 PM6/20/17
to vasiliu.ge...@gmail.com, MvvmFX
I'm not sure what we as framework developers can do to support this.
Do you have precise ideas what features are needed for this? Maybe you
can file an issue at out github page for this or maybe even create a
PullRequest for this?
What I can imagine is to add precise documentation in our wiki on how
to setup an configure logging and to add such configuration to one of
our example projects (the contacts-example would be best because it's
our most complex example and uses CDI).
Every help is welcome. I'm happy to provide support if needed but most
likely I won't have time to fix this alone any time soon.
> --
> You received this message because you are subscribed to the Google Groups
> "MvvmFX" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mvvmfx-dev+...@googlegroups.com.
> To post to this group, send email to mvvmf...@googlegroups.com.
> Visit this group at https://groups.google.com/group/mvvmfx-dev.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mvvmfx-dev/4cf154b1-740c-4c58-aa49-af8bff10d36c%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages