Revision
15378
Author
anthm
Date
2009-11-05 17:19:20 -0600 (Thu, 05 Nov 2009)

Log Message

add help

Modified Paths

Diff

Modified: freeswitch/trunk/libs/esl/perl/logger.pl (15377 => 15378)


--- freeswitch/trunk/libs/esl/perl/logger.pl	2009-11-05 23:01:43 UTC (rev 15377)
+++ freeswitch/trunk/libs/esl/perl/logger.pl	2009-11-05 23:19:20 UTC (rev 15378)
@@ -13,6 +13,21 @@
 my $running = 1;
 my $con;
 
+my $USAGE = "
+FreeSWITCH Logger Utility
+
+USAGE:
+-h --helpThis help
+-p --port <port>            Choose port
+-P -pass  <pass>            Choose password
+-f --file <file>            Output file
+-pb --paste-bin <name>	    Post to FreeSWITCH Paste Bin
+-sp --sip-profiles <list>   List of SIP profiles to trace
+-sd --sip-debug <leve>      Set SIP debug level
+
+No arguments given will trace profile 'internal' to STDOUT
+";
+
 $SIG{INT} = sub { $running = 0 };
 
 sub parse(\$\$$) {
@@ -27,6 +42,11 @@
 }
 
 for($i = 0; $i < $argc; $i++) {
+    if ($ARGV[$i] =~ /^\-help$|^\-\-help$/) {
+	print $USAGE;
+	exit;
+    }
+
     if (! (parse($i, $host, '^-h$|^--host$') ||
 	   parse($i, $port, '^-p$|^--port$') ||
 	   parse($i, $pass, '^-P$|^--pass$') ||