#!/usr/local/bin/perl
#
#

package Log;

use strict;
use warnings;

use Sys::Syslog; 
Sys::Syslog::setlogsock('unix');

use NfConf;

our $ERROR;

sub LogInit {
	openlog("nfsen", 'cons,pid', $NfConf::syslog_facility);

} # End of LogInit

sub LogEnd {
	closelog();

} # End of LogEnd

sub TIEHANDLE {
	my $class	 = shift;
	my $name	 = shift;

	my %self;
	$self{'facility'} = $NfConf::syslog_facility;

	bless \%self, $class;

} # End of TIEHANDLE

sub PRINT {
	my $self = shift;
	my $msg = join '', @_;

	syslog('warning', "$msg"); 
}

sub UNTIE {
	my $self = shift;

} # End of UNTIE

1;
