[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Terracotta logs keep growing  XML
Forum Index -> Terracotta Platform
Author Message
wicher

neo

Joined: 09/12/2013 23:40:38
Messages: 1
Offline

Hi,
Is there any configuration that limits log file size? I mean server and client logs.
For server logs I added property:
<property name="logging.maxLogFileSize" value="15M" />

But it seems it isn't working.

For client log I managed to find only one configuration which is log file location:

<clients>
<logs>C:\Terracotta\client-logs</logs>
....

Is there a way to control size of client logs?
rmahajan

journeyman

Joined: 12/28/2011 21:53:45
Messages: 47
Offline

You can customize logging by creating a file named ".tc.custom.log4j.properties" either in your home directory ("user.home") or the working dir of your java process ("user.dir"). In there you can do the usual log4j configuration. This is supported for versions terracotta-3.6.x and above.

Other than that you can use the following properties (applicable for client and server)
logging.maxBackups = 20 [The maximum number of backup log files to keep]
logging.maxLogFileSize = 512 [By Default in MB, no need to mention M, once file size reached, it will rolled over]

Cheers,
Ridhav
deeps

neo

Joined: 04/16/2014 01:55:05
Messages: 1
Offline

Hi Ridhav,

I am using terracotta-3.6.2 and tried your advice regarding the custom log4j file. But Terracotta continues to write in "terracotta-server.log". Can you please elaborate on how to setup the custom logging.

My ".tc.custom.log4j.properties" is listed below:

log4j.appender.tc=org.apache.log4j.ConsoleAppender
log4j.appender.tc.Target=/var/terracotta/server-logs/System.out
log4j.appender.tc.layout=org.apache.log4j.PatternLayout
log4j.appender.tc.layout.ConversionPattern=%d{HH:mm:ss.SSS} - %m%n

log4j.rootLogger=INFO
log4j.logger.com.terracottatech=INFO, tc
log4j.logger.com.terracottatech.console=INFO, tc
log4j.logger.com.terracottatech.general=INFO, tc
 
Forum Index -> Terracotta Platform
Go to:   
Powered by JForum 2.1.7 © JForum Team