New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvote
Accepted
401 23 28 37

Does RFA Java offer options for log file rotation?

treprfarfa-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
9.6k 10 7 7

RFAJ does not provide the parameter to set the maximum of log file. However, you can split the large log file manually into smaller ones before open/analysis it.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
25.4k 90 13 26

RFA Java uses the standard J2SE Logging API

You can specify the patterns as required with the logFileName parameter as part of your connection configuration. See the RFAJ_ConfigLoggingGuide.pdf for details of this parameter and refer to J2SE java.util.logging documentation for the filename patterns to use etc.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks. I would like RFA Java rotate to a new log file when the log file's size reaches to the maximum. Does RFA Java provide the configuration parameter to set the maximum size before it rotates to a new file? I would like this parameter because my log file can be very large e.g.3-4 GB and I cannot open it.

Upvote
1.6k 5 6 7

@SusanGenoray. This is really a Java question, rather than a RFA question. As stated in the documentation the RFA Java internally uses the standard JDK FileHandler. As you can see this Handler actually has build-in support for rotation-by-size ... which is what you are asking for. So - without actually having tried it - I guess you can solve it by supplying a logging.properties file to your application. Something like -Djava.util.logging.config.file=mycustomlogging.properties on your command line. Then in the file mycustomlogging.properties you would have something like:

# Configure the FileHandler 
java.util.logging.FileHandler.limit =1024000 

# Side note: 
# There's no point in setting the 'java.util.logging.FileHandler.pattern'
# property here as it will always be overriden by the 'logFileName'
# parameter from the RFA config.

I hope that helps.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.