diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2015-03-20 15:32:25 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <wjp@usecode.org> | 2015-03-20 15:32:25 +0100 |
commit | 8d9ddc51076ce0da3d0a4216b1bc495783f3733c (patch) | |
tree | 200d43d0356f052fe23da463330e43b37138386e /matlab/tools | |
parent | 2d55fd38b4a8ef5076c0591ae4147f81c1107ee3 (diff) | |
parent | 9ba78fcfa3dec88928df33be26821e3fd5a10727 (diff) | |
download | astra-8d9ddc51076ce0da3d0a4216b1bc495783f3733c.tar.gz astra-8d9ddc51076ce0da3d0a4216b1bc495783f3733c.tar.bz2 astra-8d9ddc51076ce0da3d0a4216b1bc495783f3733c.tar.xz astra-8d9ddc51076ce0da3d0a4216b1bc495783f3733c.zip |
Merge pull request #30 from dmpelt/logging
New logging API
Diffstat (limited to 'matlab/tools')
-rw-r--r-- | matlab/tools/astra_mex_log.m | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/matlab/tools/astra_mex_log.m b/matlab/tools/astra_mex_log.m new file mode 100644 index 0000000..28cfa18 --- /dev/null +++ b/matlab/tools/astra_mex_log.m @@ -0,0 +1,33 @@ +function [varargout] = astra_mex_log(varargin) +%------------------------------------------------------------------------ +% Reference page in Help browser +% <a href="matlab:docsearch('astra_mex_log' )">astra_mex_log</a>. +%------------------------------------------------------------------------ +%------------------------------------------------------------------------ +% This file is part of the ASTRA Toolbox +% +% Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp +% 2014-2015, CWI, Amsterdam +% License: Open Source under GPLv3 +% Contact: astra@uantwerpen.be +% Website: http://sf.net/projects/astra-toolbox +%------------------------------------------------------------------------ +% $Id$ +if size(varargin,2)==2 && (strcmp(varargin{1},'debug') || strcmp(varargin{1},'info') || strcmp(varargin{1},'warn') || strcmp(varargin{1},'error')) + d = dbstack(1); + if size(d,1)==0 + astra_mex_log_c(varargin{1},'Unknown',0,varargin{2}) + else + astra_mex_log_c(varargin{1},d(1).file,d(1).line,varargin{2}) + end +else + if nargout == 0 + astra_mex_log_c(varargin{:}); + if exist('ans','var') + varargout{1} = ans; + end + else + varargout = cell(1,nargout); + [varargout{:}] = astra_mex_log_c(varargin{:}); + end +end
\ No newline at end of file |