question

Upvotes
Accepted
1 0 1 3

RFA log file rotation

Hello,

I’m trying to use RFA built-in logging as described in the Reuters’ “ROBUST FOUNDATION API V7.6 CONFIGURATION AND LOGGING GUIDE” but I can’t figure out how to rotate the log files based on size or a date: unless I restart my application, the log file will not rotate and grow indefinitely.

Could you please help?

Here are the settings that I use:

<entry key="mountTrace" value="true"/> <entry key="logFileName" value="RFA_RSSL.%u.%g.log"/> <entry key="traceMsgDomains" value="NORMAL"/> <entry key="ipcTraceFlags" value="31"/>

treprfarfa-apirsslloggingtrace
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.

RFA Java uses J.U.L as its logging framework. So the question is: what capabilities does JUL have? (Google or SO is your friend, this is not something specifically related to RFA). Btw: as far as I remember JUL doesn't offer log rotation based on time, only on size. At least not out-of-the-box. For log rotation based on time you'll need to pipe through something like Apache's rotatelogs or write your own JUL Handler to do the job.

FYI: Links in comments text on this website are only shown when you hover over them. So you have to move the mouse over each sentence in my comment. Don't blame me, I didn't create this website. TR: Are you listening??

Upvote
Accepted
9.5k 10 5 7

Hello jgoldin,

Your configuration is to enable RFA trace log file(showing incoming and outgoing messages sent/received to RFA) which rotating log file is not supported. Even you can set “%g” which specify the generation number to distinguish rotated logs in the filename, RFA still writes only one log file with no limit size. For example, if you set logFileName to be RFA_RSSL%u%g.log, there will be only one RFA log file e.g. RFA_RSSL00.log while RFAJ application runs.

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
23k 22 9 14

Hello @jgoldin,

If you are running RFA Java, use Java logging, not RFA specific, to define:

"RFA Java Edition uses the Java Preferences API and the Java Logging API to manage its configuration and logging", you can use

-Djava.util.logging.config.file=/path/to/logger.properties

for example:

java.util.logging.FileHandler.count = 5
java.util.logging.FileHandler.limit = 50000

If you are running RFA C++, use Config Database, to define:

"Configuration for the AppLogger component is retrieved from the Config Database with the same name as the logger itself". You can define

maxLogFileSize,

which will determine log file rotation into .OLD

Depending on how you are configuring your Config Database, in registry on Windows, or if you are configuring from file, or build config in code, please refer to App Logger section of the Config guide for the detailed description.

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.

Unfortunately, this doesn't work. RFA simply ignores JUL configuration, either the property file or programmatic.

Click below to post an Idea Post Idea