[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 856
  • Last Modified:

how to view a full log in asterisk 1.6 and 1.8 ?

Hello, I am trying to set the logs in Asterisk so it saves everything, meaning, whatever I see in console mode also to be saved, right now within /var/log/asterisk/messages there are only warnings and some others, but not everything I see in the console, is there a way to do that?.

also a second part of this question would be, is there a way to make it delete everything older than XX amount of days? so it doesn't grow that much?.


thank you.
0
darwin_roach
Asked:
darwin_roach
  • 2
1 Solution
 
darrickhartmanCommented:
These are two separate issues.  One is handled by Asterisk, the other by logrotate.

First for Asterisk:

Edit /etc/asterisk/logger.conf

By default, only 'console' and syslog.local0 are uncommented.  If you want to increase the verbosity of the content sent to syslog, you'll need to change that line to include debug or verbose.  I would recommend against doing that.  Instead, use a separate log file.  Adding a line:

    full => notice,warning,error,debug,verbose

Will log as much information as possible to the file 'full' in the location specified in the 'astlogdir' variable which is set in /etc/asterisk.conf  (usually /var/log/asterisk/).


If you want this log to be rotated, you'll need to add an entry in /etc/logrotate.d

Create a file called "asterisk" with the following content:

/var/log/asterisk/full {
     missingok
     notifempty
     sharedscripts
}

Open in new window


0
 
darwin_roachAuthor Commented:
thank you... it worked as you described, thanks for the help...!
0
 
darwin_roachAuthor Commented:
thanks
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now