|
NAMEJLog::Writer - Perl extension for writing to a jlog journal.SUMMARYuse JLog::Writer; use Fcntl qw/:DEFAULT/; my $sub = "testsubscriber"; my $log = "foo.jlog"; # open a log - this respects stander Fcntl flags my $w = JLog::Writer->new($log, O_CREAT); # add a subscriber - without this there is danger that # a log may be expired without the unnamed subscriber # stating its intention to read. $w->add_subscriber($sub); # open for writing $w->open; foreach (1 ... 3) { # write to the queue $w->write("foo $_"); } # close the queue $w->close; DESCRIPTIONJLog::Writer allows you to access a jlog queue for writing.INTERFACEConstructornew$w = JLog::Writer->new( $path_to_jlog, [ $flags [, $size ] ] ); Instantiates a JLog writer object associated with the JLog directory.
Subscriber ManagementThese functions are inherited from JLogadd_subscriber $w->add_subscriber( $name, [ $flag ] ); Add a subscriber to the JLog queue.
remove_subscriber $w->remove_subscriber ( $name ); Remove a subscriber to the JLog queue.
Writing to the Queueopen$w->open(); Opens the JLog for writing. write $w->write( $message [, $ts ] ); Write a message to the JLog.
Internalsalter_journal_size$w->alter_journal_size( $size ); Set the size of the individual journal files.
raw_size $size = $w->raw_size; The size of the existing journal (including checkpointed but unpurged messages in the current journal file), in bytes. SEE ALSOJLog JLog::ReaderCOPYRIGHT AND LICENSECopyright (C) 2006-2008 by Message Systems, Inc.
Visit the GSP FreeBSD Man Page Interface. |