Skip to content

Instantly share code, notes, and snippets.

@RUB-Bioinf
RUB-Bioinf / logger.m
Last active August 1, 2019 08:25
Logger - A concurrent Matlab logging method. Prints text to the console and an external file. Groups output into specidied IDs and adds a timestamp to every print.
% Displays a given text in the console and also appends it into a generic
% log file.
% A specific folder is created for all such log files.
% The log file is located in your current MATLAB path, in a new folder
% called "log".
% You can specifiy the log file by giving your log a unique ID. These ids
% are then grouped together and displayed in a single file.
%
% Works best for cases where you can't print to the console (eg. worker
% threads), but still need output to check later.