SYSLOG Utility with File Rotation

版本 1.0.0.0 (1.7 KB) 作者: Dan Couture
A basic logging function with log rotation that records the message along with system the time
230.0 次下载
更新时间 2012/8/29

查看许可证

Simplified logging utility that can log debugging and script information to a text file.

=====================================================
Simple Use
=====================================================
Usage:
>> syslog('this happened now')

Writes the line:
2012_08_28_19_24_08 this happened now
to:
./syslog_2012_08_28_19.log

=====================================================
Log Rotation
=====================================================
Usage:
>> syslog('first hour')
>> pause(3600)
>> syslog('second hour')

Writes the line:
2012_08_28_19_24_08 first hour
to:
./syslog_2012_08_28_19.log
Then writes the line:
2012_08_28_20_24_08 second hour
to:
./syslog_2012_08_28_20.log

=====================================================
Split logging to content specific files
=====================================================
Usage:
>> syslog('a just doubled','a')
>> syslog('b just tripled','b')

Writes the line:
2012_08_28_20_24_08 a just doubled
to:
./a_2012_08_28_20.log
Then writes the line:
2012_08_28_20_24_08 b just tripled
to:
./b_2012_08_28_20.log

引用格式

Dan Couture (2024). SYSLOG Utility with File Rotation (https://www.mathworks.com/matlabcentral/fileexchange/37948-syslog-utility-with-file-rotation), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2007a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Workspace Variables and MAT-Files 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0