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

DATALOGGER allows to log performance of functions and also save contents of their local variables into MAT-files. More...

Inheritance diagram for mxberry::log::DataLogger:
Inheritance graph
[legend]
Collaboration diagram for mxberry::log::DataLogger:
Collaboration graph
[legend]

Static Public Member Functions

static function configure (in varargin)
 CONFIGURE determines configuration parameters for data logger. More...
 
static function cell (in 1, in 0)
 
static function prop ()
 
static function ()
 
static function reshape (in functionNameList, in 1, in)
 
static function unique (in functionNameList)
 
static function addPrefixToList (in prefixStr)
 ADDPREFIXTOLIST adds prefix to the end of the list with prefixes. More...
 
static function removePrefixFromList ()
 REMOVEPREFIXFROMLIST removes prefix from the end of the list with prefixes. More...
 
static function log ()
 LOG logs info on function only as text into special log-file. More...
 
static function logData ()
 LOG logs both info on function executed and data of local variables. More...
 
static function flush ()
 FLUSH clears info set by configure within storage. More...
 

Static Protected Member Functions

static function getIsEnabled ()
 GETISENABLED determines whether logging is enabled or not. More...
 
static function getDataFileName (in shortFuncName, in fullFuncName)
 GETDATAFILENAME generates name for file with logged data. More...
 
static function getFunctionProps (in indStack)
 GETFUNCTIONPROPS returns short name of function as well as its full name including all necessary prefixes and information whether it is to be logged or not. More...
 
static function getPropInternal (in propName, in isPresenceChecked, in className)
 GETPROPINTERNAL gets corresponding property from storage. More...
 
static function setPropInternal (in propName, in propVal, in className)
 SETPROPINTERNAL sets value for corresponding property within storage. More...
 
- Static Protected Member Functions inherited from mxberry::core::obj::StaticPropStorage
static function getPropInternal (in branchName, in propName, in isPresenceChecked)
 
static function setPropInternal (in branchName, in propName, in propVal)
 
static function flushInternal (in branchName)
 

Detailed Description

DATALOGGER allows to log performance of functions and also save contents of their local variables into MAT-files.

Definition at line 5 of file DataLogger.m.

Member Function Documentation

◆ addPrefixToList()

static function mxberry::log::DataLogger::addPrefixToList ( in  prefixStr)
static

ADDPREFIXTOLIST adds prefix to the end of the list with prefixes.

*  Usage: addPrefixToList(prefixStr)
* 
*  input:
*    regular:
*      prefixStr: char [1,] - prefix to be added
* 

◆ cell()

static function mxberry::log::DataLogger::cell ( in  1,
in  0 
)
static

◆ configure()

static function mxberry::log::DataLogger::configure ( in  varargin)
static

CONFIGURE determines configuration parameters for data logger.

*  Usage: configure(varargin)
* 
*  input:
*    properties:
*      isEnabled: logical [1,1] - if true, then logging is
*          switched on, otherwise it is switched off
*      functionNameList: cell [1,nFunc] - list with names of
*          functions for which logging is enabled
*      storageLocationRoot: char [1,] - storage location
*      nMaxDatesOnDisk: double [1,1] - maximal number of dates
*          for which data logs may be on disk, data logs that
*          are more than this number of dates on disk are
*          deleted from the storage automatically; by default it
*          equals to 5 days
* 
Author
Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om

◆ flush()

static function mxberry::log::DataLogger::flush ( )
static

FLUSH clears info set by configure within storage.

*  Usage: flush()
* 

◆ function()

static mxberry::log::DataLogger::function ( )
static

◆ getDataFileName()

static function mxberry::log::DataLogger::getDataFileName ( in  shortFuncName,
in  fullFuncName 
)
staticprotected

GETDATAFILENAME generates name for file with logged data.

*  Usage: fileName=getDataFileName(shortFuncName,fullFuncName)
* 
*  input:
*    regular:
*      shortFuncName: char [1,] - short function name (see
*          getFunctionProps method below for details)
*      fullFuncName: char [1,] - full function name (see
*          getFunctionProps method below for details)
*  output:
*    regular:
*      fileName: char [1,] - full name of file with logged data
* 

◆ getFunctionProps()

static function mxberry::log::DataLogger::getFunctionProps ( in  indStack)
staticprotected

GETFUNCTIONPROPS returns short name of function as well as its full name including all necessary prefixes and information whether it is to be logged or not.

*  Usage: [shortFuncName,fullFuncName,isLogged]=. . .
*             getFunctionProps()
* 
*  input:
*    optional:
*      indStack: double [1,1] - index of function in stack
*          (relative to this method, 1 corresponds to the
*          immediate caller of this method); if not given
*          we take the first function in the stack that is not
*          method (or subfunction of method) of some descendant
*          of this class
*  output:
*    regular:
*      shortFuncName: char [1,] - short name of function to be
*          logged (i.e. without name of class, prefixes, etc.)
*      fullFuncName: char [1,] - full name of function with all
*          necessary prefixes
*      isLogged: logical [1,1] - if true, then given function is
*          to be logged, otherwise false
* 

◆ getIsEnabled()

static function mxberry::log::DataLogger::getIsEnabled ( )
staticprotected

GETISENABLED determines whether logging is enabled or not.

*  Usage: isEnabled=getIsEnabled(className)
* 
*  output:
*    regular:
*      isEnabled: logical [1,1] - if true, then logging is
*          enabled, otherwise falsr
* 

◆ getPropInternal()

static function mxberry::log::DataLogger::getPropInternal ( in  propName,
in  isPresenceChecked,
in  className 
)
staticprotected

GETPROPINTERNAL gets corresponding property from storage.

*  Usage: [propVal,isThere]=. . .
*             getPropInternal(propName,isPresenceChecked)
* 
*  input:
*    regular:
*      propName: char [1,] - property name
*      isPresenceChecked: logical [1,1] - if true, then presence
*          of given property is checked before its value is
*          retrieved from the storage, otherwise value is
*          retrieved without any check (that may lead to error
*          if property is not yet logged into the storage)
*    optional:
*      className: char [1,] - name of class, if not given
*          name of current class is used
*  output:
*    regular:
*      propVal: empty or matrix of some type - value of given
*          property in the storage (if it is absent, empty is
*          returned)
*    optional:
*      isThere: logical [1,1] - if true, then property is in the
*          storage, otherwise false
* 

◆ log()

static function mxberry::log::DataLogger::log ( )
static

LOG logs info on function only as text into special log-file.

*  Usage: log()
* 

◆ logData()

static function mxberry::log::DataLogger::logData ( )
static

LOG logs both info on function executed and data of local variables.

*  Usage: logData()
* 

◆ prop()

static function mxberry::log::DataLogger::prop ( )
static

◆ removePrefixFromList()

static function mxberry::log::DataLogger::removePrefixFromList ( )
static

REMOVEPREFIXFROMLIST removes prefix from the end of the list with prefixes.

*  Usage: removePrefixFromList()
* 

◆ reshape()

static function mxberry::log::DataLogger::reshape ( in  functionNameList,
in  1,
in   
)
static

◆ setPropInternal()

static function mxberry::log::DataLogger::setPropInternal ( in  propName,
in  propVal,
in  className 
)
staticprotected

SETPROPINTERNAL sets value for corresponding property within storage.

*  Usage: setPropInternal(propName,propVal)
* 
*  input:
*    regular:
*      propName: char - property name
*      propVal: matrix of some type - value of given property to
*          be set in the storage
*    optional:
*      className: char [1,] - name of class, if not given
*          name of current class is used
* 

◆ unique()

static function mxberry::log::DataLogger::unique ( in  functionNameList)
static

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