Discussion:
[asterisk-users] Asterisk Message Logs
K***@forces.gc.ca
2007-08-23 15:14:31 UTC
Permalink
Hello,

Is it possible to print the Asterisk message logs to a file, or is this already done? By message logs I mean the display that shows up on the asterisk server when a call is made from one user to another. I believe if the verbosity is high, it can show what parts of the extension.conf file that it uses when making the call. I am trying to use two Jain-sip-applet-phones, connected through an Asterisk server. I can't seem to get communication between the two phones. Does anyone have any experience using these open-source Jain-sip-applet-phones?

Thanks,

Denis
Jared Smith
2007-08-23 16:17:47 UTC
Permalink
Post by K***@forces.gc.ca
Is it possible to print the Asterisk message logs to a file, or is
this already done?
You want to look at the logger.conf configuration file, and see how your
Asterisk system is set to log the various types of information (such as
debug messages, verbose messages, DTMF messages, etc.) are logged.

After changing logger.conf, you can type "logger" reload at the Asterisk
CLI to make the changes take effect.
--
Jared Smith
Community Relations Manager
Digium, Inc.
K***@forces.gc.ca
2007-08-23 16:46:37 UTC
Permalink
Thanks for your reply. I have previously looked at the logger.conf file. I see that the various types of information can be logged in different ways. After setting the various information types with whatever I want logged, is it possible to save the actual logs to a file (ie: As the messages are bring printed, save them all to a file to be viewed later).

Thanks,

Denis
-----Original Message-----
From: asterisk-users-***@lists.digium.com
[mailto:asterisk-users-***@lists.digium.com]On Behalf Of Jared Smith
Sent: Thursday, August 23, 2007 12:18 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk Message Logs
Post by K***@forces.gc.ca
Is it possible to print the Asterisk message logs to a file, or is
this already done?
You want to look at the logger.conf configuration file, and see how your
Asterisk system is set to log the various types of information (such as
debug messages, verbose messages, DTMF messages, etc.) are logged.

After changing logger.conf, you can type "logger" reload at the Asterisk
CLI to make the changes take effect.
--
Jared Smith
Community Relations Manager
Digium, Inc.


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Ron Joffe
2007-08-23 17:07:36 UTC
Permalink
Post by K***@forces.gc.ca
Thanks for your reply. I have previously looked at the logger.conf file.
I see that the various types of information can be logged in different
ways. After setting the various information types with whatever I want
logged, is it possible to save the actual logs to a file (ie: As the
messages are bring printed, save them all to a file to be viewed later).
I utilize this command:

nohup script -f -c "asterisk -vvvTn" /tmp/asterisk.log &

To start up my apps. This will log everything to a log file.

Ron
Tzafrir Cohen
2007-08-23 18:00:57 UTC
Permalink
Post by Ron Joffe
Post by K***@forces.gc.ca
Thanks for your reply. I have previously looked at the logger.conf file.
I see that the various types of information can be logged in different
ways. After setting the various information types with whatever I want
logged, is it possible to save the actual logs to a file (ie: As the
messages are bring printed, save them all to a file to be viewed later).
nohup script -f -c "asterisk -vvvTn" /tmp/asterisk.log &
To start up my apps. This will log everything to a log file.
Why nohup? And if you have nohup, why script?

It will log everything until the cotrolling terminal is lost, right? I
think what you're actually looking for is screen.


If you want asterisk daemonized but still want it verbose, use -F
--
Tzafrir Cohen
icq#16849755 jabber:***@jabber.org
+972-50-7952406 mailto:***@xorcom.com
http://www.xorcom.com iax:***@local.xorcom.com/tzafrir
Ron Joffe
2007-08-23 18:32:02 UTC
Permalink
Post by Tzafrir Cohen
Post by Ron Joffe
nohup script -f -c "asterisk -vvvTn" /tmp/asterisk.log &
To start up my apps. This will log everything to a log file.
Why nohup? And if you have nohup, why script?
It will log everything until the cotrolling terminal is lost, right? I
think what you're actually looking for is screen.
If you want asterisk daemonized but still want it verbose, use -F
I call asterisk startup from a shell script. "nohup" will guarantee that the
process will not die if the calling process (whatever started the shell
script) dies.

script is what I use to make sure that everything that would otherwise go to
the asterisk cli output makes it into that file. We spawn our own extensions
from asterisk which the asterisk logging facility does not capture. This way
we get everything that would be seen on the cli. I'm not looking for screen
functionality.

-F is not an option on my version of asterisk.

Ron
Anthony Francis
2007-08-23 18:43:15 UTC
Permalink
The problem with any of these choices is that they do not address
logfile rotation.

Try this:

http://cr.yp.to/daemontools.html
Post by Ron Joffe
Post by Tzafrir Cohen
Post by Ron Joffe
nohup script -f -c "asterisk -vvvTn" /tmp/asterisk.log &
To start up my apps. This will log everything to a log file.
Why nohup? And if you have nohup, why script?
It will log everything until the cotrolling terminal is lost, right? I
think what you're actually looking for is screen.
If you want asterisk daemonized but still want it verbose, use -F
I call asterisk startup from a shell script. "nohup" will guarantee that the
process will not die if the calling process (whatever started the shell
script) dies.
script is what I use to make sure that everything that would otherwise go to
the asterisk cli output makes it into that file. We spawn our own extensions
from asterisk which the asterisk logging facility does not capture. This way
we get everything that would be seen on the cli. I'm not looking for screen
functionality.
-F is not an option on my version of asterisk.
Ron
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
asterisk-users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
--
Thank you and have a wonderful day,

Anthony Francis
Rockynet VOIP
(303) 444-7052 opt 2
***@rockynet.com
Tzafrir Cohen
2007-08-23 19:21:19 UTC
Permalink
Post by Anthony Francis
The problem with any of these choices is that they do not address
logfile rotation.
Because this can be done with the standard system logrotate, or even by
asterisk (if you trust it to that). Decently-packaged Asterisk comes
with log rotation configuration.

Indeed the output of the CLI should not be simply logged. Asterisk has a
good enough logging facility that need not be replicated. There is no
need to start asterisk vebosely by default and spend useless CPU time on
useless messages. Use verbose messages when trying to debug a problem.
Let errors stand out when they come.
Post by Anthony Francis
http://cr.yp.to/daemontools.html
and endure the voodoo.
--
Tzafrir Cohen
icq#16849755 jabber:***@jabber.org
+972-50-7952406 mailto:***@xorcom.com
http://www.xorcom.com iax:***@local.xorcom.com/tzafrir
Brian Jones
2007-08-23 17:11:23 UTC
Permalink
Post by K***@forces.gc.ca
Thanks for your reply. I have previously looked at the logger.conf file. I see that the various types of information can be logged in different ways. After setting the various information types with whatever I want logged, is it possible to save the actual logs to a file (ie: As the messages are bring printed, save them all to a file to be viewed later).
What do you mean by actual logs? Console (CLI) output?

Brian.
Post by K***@forces.gc.ca
Thanks,
Denis
-----Original Message-----
Sent: Thursday, August 23, 2007 12:18 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk Message Logs
Post by K***@forces.gc.ca
Is it possible to print the Asterisk message logs to a file, or is
this already done?
You want to look at the logger.conf configuration file, and see how your
Asterisk system is set to log the various types of information (such as
debug messages, verbose messages, DTMF messages, etc.) are logged.
After changing logger.conf, you can type "logger" reload at the Asterisk
CLI to make the changes take effect.
Brian Jones
2007-08-23 17:09:45 UTC
Permalink
Post by K***@forces.gc.ca
Hello,
Is it possible to print the Asterisk message logs to a file, or is this already done? By message logs I mean the display that shows up on the asterisk server when a call is made from one user to another. I believe if the verbosity is high, it can show what parts of the extension.conf file that it uses when making the call. I am trying to use two Jain-sip-applet-phones, connected through an Asterisk server. I can't seem to get communication between the two phones. Does anyone have any experience using these open-source Jain-sip-applet-phones?
Thanks,
Denis
Add this to logger.conf:

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

and you should have most of the output stored in /var/log/asterisk/full

Brian.
Post by K***@forces.gc.ca
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
asterisk-users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
K***@forces.gc.ca
2007-08-23 18:01:06 UTC
Permalink
Yes, any output from the console logs. I tried viewing the full file and it looks like it's what I was looking for. Thanks for the help.

Denis

-----Original Message-----
From: asterisk-users-***@lists.digium.com
[mailto:asterisk-users-***@lists.digium.com]On Behalf Of Brian Jones
Sent: Thursday, August 23, 2007 1:11 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk Message Logs
Post by K***@forces.gc.ca
Thanks for your reply. I have previously looked at the logger.conf file. I see that the various types of information can be logged in different ways. After setting the various information types with whatever I want logged, is it possible to save the actual logs to a file (ie: As the messages are bring printed, save them all to a file to be viewed later).
What do you mean by actual logs? Console (CLI) output?

Brian.
Post by K***@forces.gc.ca
Thanks,
Denis
-----Original Message-----
Sent: Thursday, August 23, 2007 12:18 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk Message Logs
Post by K***@forces.gc.ca
Is it possible to print the Asterisk message logs to a file, or is
this already done?
You want to look at the logger.conf configuration file, and see how your
Asterisk system is set to log the various types of information (such as
debug messages, verbose messages, DTMF messages, etc.) are logged.
After changing logger.conf, you can type "logger" reload at the Asterisk
CLI to make the changes take effect.
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
James Collier
2007-08-23 18:56:11 UTC
Permalink
You can configure logger.conf so that it will log just about everything you
could want.

http://www.voip-info.org/wiki/index.php?page=Asterisk+config+logger.conf

-----Mensaje original-----
De: asterisk-users-***@lists.digium.com
[mailto:asterisk-users-***@lists.digium.com]En nombre de
***@forces.gc.ca
Enviado el: jueves, 23 de agosto de 2007 17:15
Para: asterisk-***@lists.digium.com
Asunto: [asterisk-users] Asterisk Message Logs


Hello,

Is it possible to print the Asterisk message logs to a file, or is this
already done? By message logs I mean the display that shows up on the
asterisk server when a call is made from one user to another. I believe if
the verbosity is high, it can show what parts of the extension.conf file
that it uses when making the call. I am trying to use two
Jain-sip-applet-phones, connected through an Asterisk server. I can't seem
to get communication between the two phones. Does anyone have any
experience using these open-source Jain-sip-applet-phones?

Thanks,

Denis


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Continue reading on narkive:
Loading...