help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Logging Facility for Octave


From: Pavel Hofman
Subject: Re: Logging Facility for Octave
Date: Fri, 4 Jan 2019 21:00:11 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1


For logging in Matlab, I actually use an M-code wrapper layer that sits on top of log4j + SLF4J and presents an M-code interface for it (with short-circuiting for performance) and a little configurator GUI. That way you get all the features of log4j/SLF4J, and any Java code or libraries you use in your application can go through the same logging mechanism so it can be configured at a single point.

https://github.com/apjanke/SLF4M

(Background - I've used logging layers like this in enterprise Matlab systems, so I'm confident it's a decent approach.)

It wouldn't be too hard to port this to Octave. Or if Java dot-reference support were added to Octave (https://savannah.gnu.org/bugs/?48428), it should just work as is.

There are a couple other logging packages on MathWorks File Exchange that use pure M-code, and might work as is in Octave, too.

https://www.mathworks.com/matlabcentral/fileexchange/?utf8=%E2%9C%93&term=logging

I wouldn't worry about performance optimization too much; the main thing to worry about is keeping your logging calls out of tight loops.

Cheers,
Andrew

Hi Andrew,

Thanks a log for your hints. I was searching google for octave as a keyword and that did not return any results. Searching for matlab did not come to my mind, my fault. The link with matlab logging projects is great.

Many thanks and best regards,

Pavel.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]