Solved

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

Posted on 2011-02-19
3
832 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

707 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

17 Experts available now in Live!

Get 1:1 Help Now