MatrixBerryCore
Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
mxberry::log::log4j::Log4jConfigurator Class Reference

LOG4JCONFIGURATOR simplifies log4j configuration, especially when Parallel Computing Toolbox is used. In the latter case the class forwards the logs of different processees in separate log files. More...

Inheritance diagram for mxberry::log::log4j::Log4jConfigurator:
Inheritance graph
[legend]
Collaboration diagram for mxberry::log::log4j::Log4jConfigurator:
Collaboration graph
[legend]

Static Public Member Functions

static function isConfigured ()
 
static function isLocked ()
 
static function configureSimply (in logLevel, in varargin)
 
static function getLogger (in loggerName, in isSuffix)
 GETLOGGER - gets logger for caller (it may be either script or function or method of some class) More...
 
static function lockConfiguration ()
 
static function unlockConfiguration ()
 
static function getLastLogPropStr ()
 
virtual static function getMainLogFileName ()
 
virtual static function configure (in confSource)
 

Public Attributes

Constant Property MASTER_LOG_FILE_NAME
 
Constant Property CHILD_LOG_FILE_NAME_PREFIX
 
Constant Property LOG_FILE_EXT
 
Constant Property MAIN_LOG_FILE_PREFIX
 
Constant Property SP_MAIN_LOG_FILE_NAME
 
Constant Property SP_CUR_PROCESS_NAME
 
Constant Property SP_LOG_DIR_WITH_SEP
 
Constant Property SP_LOG_FILE_EXP
 

Protected Member Functions

function getMainLogFileNameInternal (in self)
 GETMAINLOGFILENAMEINTERNAL - returns a full name of the main log file. More...
 
function getShortMainLogFileNameInternal (in self)
 GETMAINLOGFILENAME - returns a short name (without path) of the main log file. More...
 
function getCurProcessNameInternal (in self)
 GETCURPROCESSNAME - returns a name of currently running process. More...
 
function getMainLogFilePathInternal (in self)
 
function configureInternal (in self, in logPropStr, in varargin)
 CONFIGURE - performs log4j configuration using a log4j property string as a source. More...
 

Static Protected Member Functions

static function getSetConfStatus (in varargin)
 
static function getSetLockStatus (in varargin)
 
static function getSetLogPropStr (in varargin)
 

Detailed Description

LOG4JCONFIGURATOR simplifies log4j configuration, especially when Parallel Computing Toolbox is used. In the latter case the class forwards the logs of different processees in separate log files.

*  The Configurator keeps track of configuration attempts (this works
*  only within a single thread). When configuration is performed using
*  configureInternal, the latest log4j property string is stored and can
*  then be retrieved using getLastLogPropStr.
* 
*  By default, log4j can be reconfigured by successive calls to its
*  configuration methods. However, if the latest configuration is locked
*  using lockConfiguration, subsequent calls to either configureSimply
*  or configureInternal will result in a warning with no configuration
*  change, until unlockConfiguration is called.
* 
Author
Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om

Definition at line 24 of file Log4jConfigurator.m.

Member Function Documentation

◆ configure()

virtual static function mxberry::log::log4j::Log4jConfigurator::configure ( in  confSource)
staticvirtual

◆ configureInternal()

function mxberry::log::log4j::Log4jConfigurator::configureInternal ( in  self,
in  logPropStr,
in  varargin 
)
protected

CONFIGURE - performs log4j configuration using a log4j property string as a source.

◆ configureSimply()

static function mxberry::log::log4j::Log4jConfigurator::configureSimply ( in  logLevel,
in  varargin 
)
static

◆ getCurProcessNameInternal()

function mxberry::log::log4j::Log4jConfigurator::getCurProcessNameInternal ( in  self)
protected

GETCURPROCESSNAME - returns a name of currently running process.

◆ getLastLogPropStr()

static function mxberry::log::log4j::Log4jConfigurator::getLastLogPropStr ( )
static

◆ getLogger()

static function mxberry::log::log4j::Log4jConfigurator::getLogger ( in  loggerName,
in  isSuffix 
)
static

GETLOGGER - gets logger for caller (it may be either script or function or method of some class)

◆ getMainLogFileName()

virtual static function mxberry::log::log4j::Log4jConfigurator::getMainLogFileName ( )
staticvirtual

◆ getMainLogFileNameInternal()

function mxberry::log::log4j::Log4jConfigurator::getMainLogFileNameInternal ( in  self)
protected

GETMAINLOGFILENAMEINTERNAL - returns a full name of the main log file.

◆ getMainLogFilePathInternal()

function mxberry::log::log4j::Log4jConfigurator::getMainLogFilePathInternal ( in  self)
protected

◆ getSetConfStatus()

static function mxberry::log::log4j::Log4jConfigurator::getSetConfStatus ( in  varargin)
staticprotected

◆ getSetLockStatus()

static function mxberry::log::log4j::Log4jConfigurator::getSetLockStatus ( in  varargin)
staticprotected

◆ getSetLogPropStr()

static function mxberry::log::log4j::Log4jConfigurator::getSetLogPropStr ( in  varargin)
staticprotected

◆ getShortMainLogFileNameInternal()

function mxberry::log::log4j::Log4jConfigurator::getShortMainLogFileNameInternal ( in  self)
protected

GETMAINLOGFILENAME - returns a short name (without path) of the main log file.

◆ isConfigured()

static function mxberry::log::log4j::Log4jConfigurator::isConfigured ( )
static

◆ isLocked()

static function mxberry::log::log4j::Log4jConfigurator::isLocked ( )
static

◆ lockConfiguration()

static function mxberry::log::log4j::Log4jConfigurator::lockConfiguration ( )
static

◆ unlockConfiguration()

static function mxberry::log::log4j::Log4jConfigurator::unlockConfiguration ( )
static

Member Data Documentation

◆ CHILD_LOG_FILE_NAME_PREFIX

Constant Property mxberry::log::log4j::Log4jConfigurator::CHILD_LOG_FILE_NAME_PREFIX

Definition at line 32 of file Log4jConfigurator.m.

◆ LOG_FILE_EXT

Constant Property mxberry::log::log4j::Log4jConfigurator::LOG_FILE_EXT

Definition at line 34 of file Log4jConfigurator.m.

◆ MAIN_LOG_FILE_PREFIX

Constant Property mxberry::log::log4j::Log4jConfigurator::MAIN_LOG_FILE_PREFIX

Definition at line 36 of file Log4jConfigurator.m.

◆ MASTER_LOG_FILE_NAME

Constant Property mxberry::log::log4j::Log4jConfigurator::MASTER_LOG_FILE_NAME

Definition at line 30 of file Log4jConfigurator.m.

◆ SP_CUR_PROCESS_NAME

Constant Property mxberry::log::log4j::Log4jConfigurator::SP_CUR_PROCESS_NAME

Definition at line 40 of file Log4jConfigurator.m.

◆ SP_LOG_DIR_WITH_SEP

Constant Property mxberry::log::log4j::Log4jConfigurator::SP_LOG_DIR_WITH_SEP

Definition at line 42 of file Log4jConfigurator.m.

◆ SP_LOG_FILE_EXP

Constant Property mxberry::log::log4j::Log4jConfigurator::SP_LOG_FILE_EXP

Definition at line 44 of file Log4jConfigurator.m.

◆ SP_MAIN_LOG_FILE_NAME

Constant Property mxberry::log::log4j::Log4jConfigurator::SP_MAIN_LOG_FILE_NAME

Definition at line 38 of file Log4jConfigurator.m.


The documentation for this class was generated from the following file: