Solved

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

Posted on 2011-02-19
3
837 Views
Last Modified: 2013-11-13
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
Comment
Question by:darwin_roach
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
darrickhartman earned 500 total points
ID: 34940216
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
 

Author Comment

by:darwin_roach
ID: 34943027
thank you... it worked as you described, thanks for the help...!
0
 

Author Closing Comment

by:darwin_roach
ID: 34943029
thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now