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  -  NO::WORRIES::SYSLOG (3)

.ds Aq ’

NAME

No::Worries::Syslog - syslog handling without worries

CONTENTS

SYNOPSIS



  use No::Worries::Syslog qw(syslog_open syslog_close syslog_info);

  # setup/open syslog
  syslog_open(ident => "progname", facility => "daemon");

  # report an informational message
  syslog_info("foo is %s", $foo);

  # close syslog
  syslog_close();



DESCRIPTION

This module eases syslog handling by providing convenient wrappers around standard syslog functions.

The functions provide a thin layer on top of Sys::Syslog to make it easier and safer to use. All the functions die() on error and the strings passed to syslog will always be sanitized.

FUNCTIONS

This module provides the following functions (none of them being exported by default):
syslog_open([OPTIONS]) open a connection to syslog using Sys::Syslog’s openlog(); supported options
o facility: corresponding to openlog()’s eponymous argument
o ident: corresponding to openlog()’s eponymous argument
o option: corresponding to openlog()’s eponymous argument
syslog_close() close a connection to syslog using Sys::Syslog’s closelog()
syslog_sanitize(STRING) sanitize the given string so that it can safely be given to syslog(): UTF-8 encode wide characters, trim trailing spaces, replace tabs by spaces, URI escape non-printable characters and truncate if too long
syslog_debug(MESSAGE) report a sanitized debugging message to syslog (with LOG_DEBUG priority and [DEBUG] prefix)
syslog_debug(FORMAT, ARGUMENTS...) idem but with sprintf()-like API
syslog_info(MESSAGE) report a sanitized informational message to syslog (with LOG_INFO priority and [INFO] prefix)
syslog_info(FORMAT, ARGUMENTS...) idem but with sprintf()-like API
syslog_warning(MESSAGE) report a sanitized warning message to syslog (with LOG_WARNING priority and [WARNING] prefix)
syslog_warning(FORMAT, ARGUMENTS...) idem but with sprintf()-like API
syslog_error(MESSAGE) report a sanitized error message to syslog (with LOG_ERR priority and [ERROR] prefix)
syslog_error(FORMAT, ARGUMENTS...) idem but with sprintf()-like API
log2syslog(INFO) No::Worries::Log handler to send information to syslog; this is not exported and must be called explicitly

GLOBAL VARIABLES

This module uses the following global variables (none of them being exported):
$MaximumLength maximum length of a message given to syslog (default: 1000)
$SplitLines true if multi-line messages should be logged as separate syslog messages (default: true)

SEE ALSO

No::Worries, No::Worries::Die, No::Worries::Log, No::Worries::Warn, Sys::Syslog, URI::Escape.

AUTHOR

Lionel Cons <http://cern.ch/lionel.cons>

Copyright (C) CERN 2012-2013

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


perl v5.20.3 NO::WORRIES::SYSLOG (3) 2013-05-21

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