NAME

Zing::Journal - System Journal

ABSTRACT

Central System Journal

SYNOPSIS

  use Zing::Journal;

  my $journal = Zing::Journal->new;

  # $journal->recv;

DESCRIPTION

This package provides the default central mechanism for creating and retrieving process event logs.

INHERITS

This package inherits behaviors from:

Zing::Channel

LIBRARIES

This package uses type constraints from:

Zing::Types

ATTRIBUTES

This package has the following attributes:

level

  level(Str)

This attribute is read-only, accepts (Str) values, and is optional.

name

  name(Str)

This attribute is read-only, accepts (Str) values, and is optional.

tap

  tap(Bool)

This attribute is read-write, accepts (Bool) values, and is optional.

verbose

  verbose(Bool)

This attribute is read-only, accepts (Bool) values, and is optional.

METHODS

This package implements the following methods:

stream

  stream(CodeRef $callback) : Object

The stream method taps the process event log and executes the provided callback for each new event.

stream example #1
  # given: synopsis

  my $example = {
    from => '...',
    data => {logs => {}},
  };

  for (1..5) {
    $journal->send($example);
  }

  $journal->stream(sub {
    my ($info, $data, $lines) = @_;
    $journal->tap(0); # stop
  });

term

  term() : Str

The term method returns the name of the journal.

term example #1
  # given: synopsis

  $journal->term;

AUTHOR

Al Newkirk, awncorp@cpan.org

LICENSE

Copyright (C) 2011-2019, Al Newkirk, et al.

This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".

PROJECT

Wiki

Project

Initiatives

Milestones

Contributing

Issues