Controlling logs size

Homer

Member
Hi there, im running WCS on ubuntu. How do i control the size of the logs and is it possible to disable it completely ? I woke up today having my harddisk completely full of logs mostly from flashphoner_manager.log.xxx .

Regards,
Homer.
 

Max

Administrator
Staff member
Hi,
there is no possibility to enable rotation for flashphoner_manager logs, we will give such property in the next versions. Right now you can set WARN log level for manager, this will decrease size of logs:
1. Stop WCS server with bin/webcallserver stop
2. Goto 'lib' directory, open wcs_manager-1.0.jar (for example with midnight commander)
3. Edit log4j.properties inside jar file, change log4j.rootLogger to:
Code:
 log4j.rootLogger=warn, stdout, fAppender
4. Save changes
5. Start server with bin/webcallserver start
 

Max

Administrator
Staff member
Hi,
we added log rotation in last build.
ExtendedDailyRollingFileAppender can be used to limit log files both core and manager.
Additional configuration options for conf/log4j.properties:
Code:
log4j.appender.fAppender.MaxNumberOfDays=7 #how long do we keep them
log4j.appender.fAppender.MaxFilesInFolder=0 #max number of files to keep
log4j.appender.fAppender.CompressBackups=false #compress old logs, effective only if MaxFilesInFolder=0
Example 1, rotate logs every hour and keep only 12 files which will give us last 12 hours only:
Code:
log4j.appender.fAppender=com.flashphoner.common.logging.ExtendedDailyRollingFileAppender
log4j.appender.fAppender.DatePattern='.'yyyy-MM-dd-HH
log4j.appender.fAppender.MaxNumberOfDays=1
log4j.appender.fAppender.MaxFilesInFolder=12
log4j.appender.fAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.fAppender.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %20.20c{1} - %t %m%n
log4j.appender.fAppender.File=${com.flashphoner.fms.AppHome}/logs/server_logs/flashphoner.log
Example 2, rotate logs every hour and keep only last 2 days:
Code:
log4j.appender.fAppender=com.flashphoner.common.logging.ExtendedDailyRollingFileAppender
log4j.appender.fAppender.DatePattern='.'yyyy-MM-dd-HH
log4j.appender.fAppender.MaxNumberOfDays=2
log4j.appender.fAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.fAppender.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %20.20c{1} - %t %m%n
log4j.appender.fAppender.File=${com.flashphoner.fms.AppHome}/logs/server_logs/flashphoner.log
 

mbedial

Member
Hi, I have the same problem but still have -5.0.3333 release.
I'm considering to do this:
3. Edit log4j.properties inside jar file, change log4j.rootLogger to:
But my question is, Can't I to edit the log4j.properties file inside FlashphonerWebCallServer/conf# ?

Thanks a lot.
 

mbedial

Member
I've changed the jar file with MC but I still have thousands of INFO messages :-(
13:50:50,759 INFO WCS4CallbackHandler - pool-22-thread-6 notifyBalance 8801630306734@hasip.blablablapp.com
13:50:50,759 INFO SipCallProcessor - pool-22-thread-6 terminate: sipCall.id=495e4771-dc35-415e-af0c-5df7312920e7
13:50:50,759 INFO SipCallProcessor - pool-22-thread-6 Stop rtc media session id RTC-495e4771-dc35-415e-af0c-5df7312920e7, sipCallId 495e4771-dc35-415e-af0c-5df7312920e7
13:50:50,759 INFO MediaSession - pool-22-thread-6 Stop MediaSession id: RTC-495e4771-dc35-415e-af0c-5df7312920e7
13:50:50,759 INFO AbstractRtpSession - pool-22-thread-6 RtpSession with id RTC-495e4771-dc35-415e-af0c-5df7312920e7 terminated.
13:50:50,760 INFO ProxyMediaClient - pool-22-thread-6 Stop, subscribers size 0
13:50:50,761 INFO Agent - StunKeepAliveThread StunKeepAliveThread ends.
 

Max

Administrator
Staff member
Good day.
We tested your case on the latest release version WCS 5.0.3530:
to remove INFO messages in the logs, you just need replace 'info' to 'warn' in the file log4j.properties (setting log4j.rootLogger):
Code:
/usr/local/FlashphonerWebCallServer/conf/log4j.properties
Please, change
Code:
log4j.rootLogger=info, stdout, fAppender
to
Code:
log4j.rootLogger=warn, stdout, fAppender
If it doesn't help you, please update WCS or provide us SSH access to your server, we will check.
 
Last edited:
Top