Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas
This commit is contained in:
commit
6d0dad38e0
|
@ -337,21 +337,13 @@ CREATE TABLE `Monitors` (
|
|||
`Format` int(10) unsigned NOT NULL default '0',
|
||||
`V4LMultiBuffer` tinyint(1) unsigned,
|
||||
`V4LCapturesPerFrame` tinyint(3) unsigned,
|
||||
<<<<<<< HEAD
|
||||
`Protocol` varchar(16),
|
||||
=======
|
||||
`Protocol` varchar(16) default '',
|
||||
>>>>>>> montagereview_rework
|
||||
`Method` varchar(16) NOT NULL default '',
|
||||
`Host` varchar(64),
|
||||
`Port` varchar(8) NOT NULL default '',
|
||||
`SubPath` varchar(64) NOT NULL default '',
|
||||
`Path` varchar(255),
|
||||
<<<<<<< HEAD
|
||||
`Options` varchar(255),
|
||||
=======
|
||||
`Options` varchar(255) default '',
|
||||
>>>>>>> montagereview_rework
|
||||
`User` varchar(64),
|
||||
`Pass` varchar(64),
|
||||
`Width` smallint(5) unsigned NOT NULL default '0',
|
||||
|
|
|
@ -297,24 +297,28 @@ sub terminate {
|
|||
sub reinitialise {
|
||||
my $this = shift;
|
||||
|
||||
# So if the logger is initialized, we just return. Since the logger is NORMALLY initialized... the rest of this function never executes.
|
||||
return unless ( $this->{initialised} );
|
||||
|
||||
# Bit of a nasty hack to reopen connections to log files and the DB
|
||||
my $syslogLevel = $this->syslogLevel();
|
||||
$this->syslogLevel( NOLOG );
|
||||
$this->syslogLevel( $syslogLevel ) if ( $syslogLevel > NOLOG );
|
||||
|
||||
my $logfileLevel = $this->fileLevel();
|
||||
$this->fileLevel( NOLOG );
|
||||
$this->fileLevel( $logfileLevel ) if ( $logfileLevel > NOLOG );
|
||||
|
||||
my $databaseLevel = $this->databaseLevel();
|
||||
$this->databaseLevel( NOLOG );
|
||||
$this->databaseLevel( $databaseLevel ) if ( $databaseLevel > NOLOG );
|
||||
|
||||
my $screenLevel = $this->termLevel();
|
||||
$this->termLevel( NOLOG );
|
||||
|
||||
$this->syslogLevel( $syslogLevel ) if ( $syslogLevel > NOLOG );
|
||||
$this->fileLevel( $logfileLevel ) if ( $logfileLevel > NOLOG );
|
||||
$this->databaseLevel( $databaseLevel ) if ( $databaseLevel > NOLOG );
|
||||
$this->databaseLevel( $databaseLevel ) if ( $databaseLevel > NOLOG );
|
||||
$this->termLevel( $screenLevel ) if ( $screenLevel > NOLOG );
|
||||
}
|
||||
|
||||
# Prevents undefined logging levels
|
||||
sub limit {
|
||||
my $this = shift;
|
||||
my $level = shift;
|
||||
|
@ -375,12 +379,16 @@ sub level {
|
|||
my $level = shift;
|
||||
if ( defined($level) ) {
|
||||
$this->{level} = $this->limit( $level );
|
||||
|
||||
# effectiveLevel is the highest logging level used by any of the outputs.
|
||||
$this->{effectiveLevel} = NOLOG;
|
||||
$this->{effectiveLevel} = $this->{termLevel} if ( $this->{termLevel} > $this->{effectiveLevel} );
|
||||
$this->{effectiveLevel} = $this->{databaseLevel} if ( $this->{databaseLevel} > $this->{effectiveLevel} );
|
||||
$this->{effectiveLevel} = $this->{fileLevel} if ( $this->{fileLevel} > $this->{effectiveLevel} );
|
||||
$this->{effectiveLevel} = $this->{syslogLevel} if ( $this->{syslogLevel} > $this->{effectiveLevel} );
|
||||
$this->{effectiveLevel} = $this->{level} if ( $this->{effectiveLevel} > $this->{effectiveLevel} );
|
||||
|
||||
# ICON: I am remarking this out because I don't see the point of having an effective level, if we are just going to set it to level.
|
||||
#$this->{effectiveLevel} = $this->{level} if ( $this->{level} > $this->{effectiveLevel} );
|
||||
}
|
||||
return( $this->{level} );
|
||||
}
|
||||
|
@ -400,6 +408,7 @@ sub termLevel {
|
|||
my $this = shift;
|
||||
my $termLevel = shift;
|
||||
if ( defined($termLevel) ) {
|
||||
# What is the point of this next lint if we are just going to overwrite it with the next line? I propose we move it down one line or remove it altogether
|
||||
$termLevel = NOLOG if ( !$this->{hasTerm} );
|
||||
$termLevel = $this->limit( $termLevel );
|
||||
if ( $this->{termLevel} != $termLevel ) {
|
||||
|
|
Loading…
Reference in New Issue