PROXY  WHOIS  RQUOTE  TEXTS  SOFT  FOREX  BBOARD
 Music  Philosophy  Code  Literature  Russian

= ROOT|Technical|Code_Examples|Perl|site_perl|JUNOS|Trace.pm =

page 2 of 2




    JUNOS::Trace::init(1);  # turn on all levels of tracing

    trace("Trace", "starting rpc; ", ref($request), "sending::\n", $rpc);
     
    trace("Verbose", "--- begin request---\n",
        $rpc, ($rpc =~ /\n$/) ? "" : "\n", "--- end request ---\n"); 

=head1 DESCRIPTION

This module allows its user to define his own categories of trace messages.  
These categories can be enabled or disabled, and only the trace messages for
the enabled categories are displayed.


=head1 METHODS

init($ALL, $DO_FLAGS, $DO_FLAGS)

Initializes the module to either enable all trace categories ($ALL = 1), 
disable all debgu categories ($ALL = 0), 
enable specific categories (@$DO_FLAGS = ('Noice')) or 
disable specific categories (@$DONT_FLAGS = ('Always')).

    $ALL	Output everything if set to a non-zero value.

    $DO_FLAGS	The trace categories to be enabled on for tracing.  
		This is a reference to an array of trace categories.  
		(e.g. @$DO_FLAGS = ('Noise','Always');)

    $DONT_FLAGS	The trace categories to be disabled for tracing.  
		This is a reference to an array of trace categories.  
		(e.g. @$DONT_FLAGS = ('Noise','Always');)
	
set_dont_trace(@DONT_FLAGS)

This method is called to disable trace categories so the trace messages for these categories won't be displayed.

	
set_trace(@DO_FLAGS)

This method is called to enable trace categories so the trace messages for these categories will be displayed.

	
trace($FLAG, @MESSAGE);

Assign a trace message to a trace category.  If the category is enabled, this trace message will be displayed immediately.


=head1 SEE ALSO

=head1 AUTHOR

Juniper Junoscript Perl Team, send bug reports, hints, tips, and suggestions 
to support@juniper.net.

=head1 COPYRIGHT

Copyright (c) 2001 Juniper Networks, Inc.
All rights reserved.

=2=
THE END

1| < PREV = PAGE 2 =

UP TO ROOT | UP TO DIR | TO FIRST PAGE

Google
 

E-mail Facebook Google Digg del.icio.us BlinkList Fark Furl Ma.gnolia Netscape NewsVine Reddit Slashdot Spurl StumbleUpon Technorati YahooMyWeb LiveJournal Blogmarks TwitThis Live News2.ru BobrDobr.ru Memori.ru MoeMesto.ru

0.0184631 wallclock secs ( 0.01 usr + 0.00 sys = 0.01 CPU)