You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A option to filter the stacktrace would be great. Exceptions are always long and the most informations are not needed. It would be great if I can choose in the tinylog.properties which packages information should be printed with TinyLog.
Something like this: tinylog.stacktrace.filter = acg|javafx.scene - This could be print only informations about the package acg (and sub packages like acg.* etc.) and all information in the package javafx.scene.*
Maybe a other option with this feature would be nice. To remove the "caused by" information in exceptions (just don't print it):
java.lang.IllegalArgumentException: Invalid URL: Invalid URL or resource not found
at acg.component.Card.<init>(Card.java:38)
at acg.Applet.start(Applet.java:17)
< This Informations are not needed: >
Caused by: java.lang.IllegalArgumentException: Invalid URL or resource not found
at javafx.scene.image.Image.validateUrl(Image.java:1110)
at javafx.scene.image.Image.<init>(Image.java:620)
at acg.component.Card.<init>(Card.java:38)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
...
The option for that could be: 'tinylog.stacktrace.cause=true|false' to turn it on or off.
Currently I use a extern class to filer the informations with a regex pattern. Maybe it helps you a bit to develop an idea for your project:
I've thought about it and made a first draft that includes your use cases and some of my ideas that I've already thought about once. A stack trace filter should be configurable either globally or for specific writers. To do this, a stack trace filter must not change an existing exception (or other throwable), but return a new one.
Like policies, stack filters should be extendable as META-INF services. In the standard set of tinylog I see the following four stack trace filters:
keep: a|b for keeping only stack trace elements with the package a and b and their sub packages.
remove: a|b for removing all stack trace elements with the package a and b and their sub packages.
discard-cause for removing all cause throwables.
compress-cause for removing stack trace elements from a parent throwable which are just repeated from cause throwables like JBoss does it by default. I love this feature when working with JBoss application servers!
These filters should be combinable, like for example (in tinylog 2 properties are not starting anymore with tinylog.):
Hey :)
A option to filter the stacktrace would be great. Exceptions are always long and the most informations are not needed. It would be great if I can choose in the tinylog.properties which packages information should be printed with TinyLog.
Something like this:
tinylog.stacktrace.filter = acg|javafx.scene
- This could be print only informations about the package acg (and sub packages like acg.* etc.) and all information in the package javafx.scene.*Maybe a other option with this feature would be nice. To remove the "caused by" information in exceptions (just don't print it):
The option for that could be: 'tinylog.stacktrace.cause=true|false' to turn it on or off.
Currently I use a extern class to filer the informations with a regex pattern. Maybe it helps you a bit to develop an idea for your project:
I can't remove the "caused by" information by myself without changing your sourcecode from your Logger class.
If you need help with this - I could maybe implement this feature by myself and share the source with you. So you can add this to your project.
Nice work by the way. I like your logger :)
The text was updated successfully, but these errors were encountered: