필터 지우기
필터 지우기

How to write a Logger in MATLAB to record errors, warnings and success messages of a function file?

조회 수: 22 (최근 30일)
I have tried using Diary, but it does not store line number. Nor does it store the command after which the error is captured. I need to understand how to write a logger properly in MATLAB, so I could add messages as well along with capturing error.
  댓글 수: 4
Rik
Rik 2023년 3월 13일
I have also written functions to make this easier, but which are not present on the file exchange yet. I'm currently on mobile so I can't attach them. You can find an old version in this thread.

댓글을 달려면 로그인하십시오.

답변 (1개)

Amith
Amith 2023년 3월 27일
As per my understanding you wanted a logger that helps you to record errors ,warnings and success messages of a function file.
You can use log4m for logging your matlab code . Log4m is designed to be relatively fast and very easy to use. It has been designed to work well in a matlab environment. Use this documentation to learn more about log4m -

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by