question

Upvote
Accepted
401 15 18 33

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 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
9.5k 10 5 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 5.0 MiB each and 10.0 MiB total.

Upvotes
20.3k 73 10 20

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 5.0 MiB each and 10.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.5k 3 5 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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea