forked from MartinVogel/ALPTool
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdisplogger.m
60 lines (49 loc) · 1.74 KB
/
displogger.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
classdef displogger < logger
% DISPLOGGER LOGGER class that prints to MATLAB console
%
% class displogger is inhereted from class logger and
% implements a logger that prints all information to
% the MATLAB console using disp
%
% Methods:
% oDL = displogger() instantiates a displogger object
% str = oDL.log(str) prints log string to MATLAB console
% delete(oDL) deletes displogger object
%
% Properties:
% class displogger has no public properties.
%
% File information:
% version 1.0 (feb 2014)
% (c) Martin Vogel
% email: [email protected]
%
% Revision history:
% 1.0 (feb 2014) initial release version
%
% See also:
% filelogger, textfilelogger, logger
% +++++++++++++++++++++++++++++++++++++++++++++++++++++++
properties (SetAccess = public, GetAccess = public)
end
% +++++++++++++++++++++++++++++++++++++++++++++++++++++++
properties (SetAccess = protected, GetAccess = public)
end
% +++++++++++++++++++++++++++++++++++++++++++++++++++++++
properties (SetAccess = protected, GetAccess = protected)
end
% +++++++++++++++++++++++++++++++++++++++++++++++++++++++
methods
function obj = displogger()
% instantiate displogger object
obj.level = 0;
end
function str = log(obj, str)
% log print log string to MATLAB console
fprintf([repmat('\t',[1, obj.level]),'%s\n'], str);
end
function delete(obj) %#ok<INUSD>
% delete delete displogger object
end
end
end