Code covered by the BSD License  

Highlights from
SYSLOG Utility with File Rotation

Be the first to rate this file! 11 Downloads (last 30 days) File Size: 1.74 KB File ID: #37948
image thumbnail

SYSLOG Utility with File Rotation

by

 

A basic logging function with log rotation that records the message along with system the time

| Watch this File

File Information
Description

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

Required Products MATLAB
MATLAB release MATLAB 7.4 (R2007a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us