GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  LOG::SYSLOG::CONSTANTS (3)

.ds Aq ’

NAME

Log::Syslog::Constants - Perl extension containing syslog priority constants as defined in RFC3164.

CONTENTS

SYNOPSIS



  use Log::Syslog::Constants :all;

  @severities = (
    LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO,
    LOG_DEBUG
  );

  @facilities = (
    LOG_KERN, LOG_USER, LOG_MAIL, LOG_DAEMON, LOG_AUTH, LOG_SYSLOG, LOG_LPR,
    LOG_NEWS, LOG_UUCP, LOG_CRON, LOG_AUTHPRIV, LOG_FTP, LOG_LOCAL0,
    LOG_LOCAL1, LOG_LOCAL2, LOG_LOCAL3, LOG_LOCAL4, LOG_LOCAL5, LOG_LOCAL6,
    LOG_LOCAL7
  );

  $info_constant = get_severity(INFO);
  $local0_constant = get_facility(local0);



DESCRIPTION

Syslog messages—as standardized in RFC3164--embed a priority number (the PRI part) which is composed of a severity and a facility value. The constants which encode these values are specified in section 4.1.1, and are made available by this module. For instance, the exportable LOG_FTP constant has a value of 11, the value for the FTP facility.

EXPORTS

Nothing is exported by default. You may optionally import individual constants and functions or groups of them:



  use Log::Syslog::Constants qw(:severities); # LOG_CRIT, LOG_DEBUG, etc
  use Log::Syslog::Constants qw(:facilities); # LOG_CRON, LOG_LOCAL3, etc
  use Log::Syslog::Constants qw(:functions); # get_facility, get_severity
  use Log::Syslog::Constants qw(:all); # all of the above



FUNCTIONS

o get_facility($facility_string)
o get_severity($severity_string)

These functions look up a constant value by name, e.g. get_severity(info) == LOG_INFO.

SEE ALSO

RFC3164 <http://www.ietf.org/rfc/rfc3164.txt>

AUTHOR

Adam Thomason, <athomason@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2010-2011 by Say Media, Inc.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 LOG::SYSLOG::CONSTANTS (3) 2011-03-04

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.