Code covered by the BSD License  

Highlights from
Statistical Learning Toolbox

from Statistical Learning Toolbox by Dahua Lin
Functions for statistical learning, pattern recognition and computer vision, covering many topics.

Description of sllog
Home > sltoolbox > fileio > @sllog > sllog.m

sllog

PURPOSE ^

SLLOG Constructs a logger

SYNOPSIS ^

function logger = sllog(varargin)

DESCRIPTION ^

SLLOG Constructs a logger

 $ Syntax $
   - logger = sllog(...)

 $ Description $
   - logger = sllog(...) constructs a logger using the specified 
     properties.
     \*
     \t    The Logger Properties
     \h    name       &    description           \\
          'rootpath'   & The root path of the log filename, default = ''
          'files'      & the cell array of log filenames, default = {}
          'winshow'    & whether to show to matlab window, default = true
          'timestamp'  & whether to add time-stamp to records, 
                         default = true
          'timeformat' & the format string for time-stamp
                         can be either a number or a string
                         refer to datastr for detail.
                         default = '[yyyy-mm-dd HH:MM:SS]'
     \*

 $ History $
   - Created by Dahua Lin, on Aug 12nd, 2006

CROSS-REFERENCE INFORMATION ^

This function calls:
  • addfiles ADDFILES add a set of log files to the logger
  • slparseprops SLPARSEPROPS Parses input parameters
This function is called by:
  • edl_batchexp EDL_BATCHEXP Performs Batch experiments according to scheme
  • edl_readexpdefs EDL_READEXPDEFS Reads in an experiment definition from XML file

SOURCE CODE ^

0001 function logger = sllog(varargin)
0002 %SLLOG Constructs a logger
0003 %
0004 % $ Syntax $
0005 %   - logger = sllog(...)
0006 %
0007 % $ Description $
0008 %   - logger = sllog(...) constructs a logger using the specified
0009 %     properties.
0010 %     \*
0011 %     \t    The Logger Properties
0012 %     \h    name       &    description           \\
0013 %          'rootpath'   & The root path of the log filename, default = ''
0014 %          'files'      & the cell array of log filenames, default = {}
0015 %          'winshow'    & whether to show to matlab window, default = true
0016 %          'timestamp'  & whether to add time-stamp to records,
0017 %                         default = true
0018 %          'timeformat' & the format string for time-stamp
0019 %                         can be either a number or a string
0020 %                         refer to datastr for detail.
0021 %                         default = '[yyyy-mm-dd HH:MM:SS]'
0022 %     \*
0023 %
0024 % $ History $
0025 %   - Created by Dahua Lin, on Aug 12nd, 2006
0026 %
0027 
0028 %% parse and verify input arguments
0029 
0030 opts.rootpath = '';
0031 opts.files = {};
0032 opts.winshow = true;
0033 opts.timestamp = true;
0034 opts.timeformat = '[yyyy-mm-dd HH:MM:SS]';
0035 
0036 opts = slparseprops(opts, varargin{:});
0037 
0038 %% construction
0039 
0040 logger = struct(...
0041     'rootpath', opts.rootpath, ...
0042     'files', [], ...
0043     'winshow', opts.winshow, ...
0044     'indent', 0, ...
0045     'timestamp', true, ...
0046     'timeformat', opts.timeformat ...
0047     );
0048 logger = class(logger, 'sllog');
0049 
0050 %% open file handles
0051 
0052 logger = addfiles(logger, opts.files);
0053 
0054

Generated on Wed 20-Sep-2006 12:43:11 by m2html © 2003

Contact us at files@mathworks.com