Home > vbmeg > functions > common > utility > vb_set_verbose.m

vb_set_verbose

PURPOSE ^

Put verbose level into VBMEG environment (global) variable 'vbmeg_inst'

SYNOPSIS ^

function vb_set_verbose(verbose_level)

DESCRIPTION ^

 Put verbose level into VBMEG environment (global) variable 'vbmeg_inst'

 This function is used to control if messages in VBMEG are shown or
 not. It is noted that the verbose level is supported by vb_disp and
 other display functions (e.g., fprintf) is not affected with the
 verbose level. 

 [syntax]
 vb_set_verbose(verbose_level)

 [input]
 verbose_level: <<string>> Verbose level string
   'NONE'      Suppressing all messages 
   'EMERGENCY'
   'WARNING'
   'NOTICE'    VBMEG default value
   'INFO'
   'DEBUG'     Displaying all messages

 [example]
 >> vb_set_verbose('WARNING');

 [history]
 2010-05-26 Taku Yoshioka

 [see also]
 vb_get_verbose, vb_disp

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function vb_set_verbose(verbose_level)
0002 % Put verbose level into VBMEG environment (global) variable 'vbmeg_inst'
0003 %
0004 % This function is used to control if messages in VBMEG are shown or
0005 % not. It is noted that the verbose level is supported by vb_disp and
0006 % other display functions (e.g., fprintf) is not affected with the
0007 % verbose level.
0008 %
0009 % [syntax]
0010 % vb_set_verbose(verbose_level)
0011 %
0012 % [input]
0013 % verbose_level: <<string>> Verbose level string
0014 %   'NONE'      Suppressing all messages
0015 %   'EMERGENCY'
0016 %   'WARNING'
0017 %   'NOTICE'    VBMEG default value
0018 %   'INFO'
0019 %   'DEBUG'     Displaying all messages
0020 %
0021 % [example]
0022 % >> vb_set_verbose('WARNING');
0023 %
0024 % [history]
0025 % 2010-05-26 Taku Yoshioka
0026 %
0027 % [see also]
0028 % vb_get_verbose, vb_disp
0029 %
0030 % Copyright (C) 2011, ATR All Rights Reserved.
0031 % License : New BSD License(see VBMEG_LICENSE.txt)
0032 
0033 global vbmeg_inst;
0034 const = vb_define_verbose;
0035 
0036 switch verbose_level
0037  case 'NONE'
0038   vbmeg_inst.verbose_level = const.VERBOSE_LEVEL_NONE;
0039  case 'EMERGENCY'
0040   vbmeg_inst.verbose_level = const.VERBOSE_LEVEL_EMERGENCY;
0041  case 'WARNING'
0042   vbmeg_inst.verbose_level = const.VERBOSE_LEVEL_WARNING;
0043  case 'NOTICE'
0044   vbmeg_inst.verbose_level = const.VERBOSE_LEVEL_NOTICE;
0045  case 'INFO'
0046   vbmeg_inst.verbose_level = const.VERBOSE_LEVEL_INFO;
0047  case 'DEBUG'
0048   vbmeg_inst.verbose_level = const.VERBOSE_LEVEL_DEBUG;
0049  otherwise
0050   error(['Undefined string for verbose level: ' verbose_level]);
0051 end
0052

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005