String suffix = cfg.get("suffix", ".log");
String prefix = cfg.get("prefix");
this.setSuffix(suffix);
this.setPrefix(prefix);
this.logName = prefix + suffix;
Here the logName is initialized with local variables of prefix and suffix. Shouldn't it be initialized with a global prefix and suffix? Because when I override setPrefix() method it did not help.
Why I want to override is, in the logger configuration I have given the relative path "logs/systemLog" in the prefix which will mean that from the application directory it has to look for the logs folder. But when I deploy the application in tomcat it didn't work, I have to give an absolute path. So I am trying to override the set prefix method where I will pre-pad the tomcat base path to the value configured in the logger configuration file.
Thanks & Regards
Praveen
Hi Praveen, I’ve just created a PR to fix that.
Let’s see if it gets approved.
In the meanwhile as a
workaround, you could create a ConfigurationWrapper
class that overrides the get
method to return what you want for that specific property, and
pass that to super.setConfiguration
,
it’s not elegant but could work, or you can apply the patch.
Best regards.
Andrés.
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/5a9ce4a9-c615-4578-b9fe-2472335344e9n%40googlegroups.com.