
341Built-In MATLAB
®
Widgets and Java Classes
5.8.1 Logging Utilities
MATLAB contains several utilities/components that can be used for logging events.
The hg package contains a logger utility, which enables displaying log messages in a separate
Java window. The logger window is always available, yet hidden:
frames = java.awt.Frame.getFrames;
for idx = 1 : length(frames)
if strcmp(frames(idx).getTitle,'Logger')
f = frames(idx); f.setVisible(true); break;
end
end
The logger logs HG events based on the debugging options specied via com.mathworks.
hg.peer.DebugUtilities.setDebugOptions(dbgOptions). The possible options are enu-
merated static elds i