]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add help
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 5 Nov 2009 23:19:20 +0000 (23:19 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 5 Nov 2009 23:19:20 +0000 (23:19 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15378 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/esl/perl/logger.pl

index 2e26cfdb694a1c269a57fb8527bb405085cccb3f..59e1373b687f98f512d4ddc1d7d165ecb52f589b 100644 (file)
@@ -13,6 +13,21 @@ my $e;
 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 @@ sub parse(\$\$$) {
 }
 
 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$') ||