Why log file is not updating at first time execution of script?
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I am creating log file after the execution some command but for first time only file is creating not containing any log:
catch
disp("Error using slbuild_private:Unable to check out the Simulink Coder license to generate code")
diary('Error_log_file.txt');
In this case for the first time execution of script, is only creating 'Error_log_file.txt' and there is no log in it. But, when I am executing script second time and so on it's showing me log.
Is there any way to log command window data at 1st time of execution?
Thanks,
1 个评论
KALYAN ACHARJYA
2018-9-17
Can you share more detail & code?
Is the following error displayed?
disp("Error using slbuild_private: Unable to check out the Simulink Coder license to generate code")
采纳的回答
Walter Roberson
2018-9-17
Invoke diary() before the disp()
5 个评论
Walter Roberson
2018-9-17
Yes, if the diary file already exists then diary() with the same file name will append to it. However, logging to the diary will start immediately after the first time diary is called for any given file name.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!