How to send Matlab log to Java's file logger

11 views (last 30 days)
Hello,
I am using Matlab R2015a, MCR 8.5 and Java 1.7 for my application.
In this application, Java code invokes the custom defined Matlab functions, does some calculations and returns the result back to Java.
I want certain logging in MATLAB to be sent to Java's File logger which could be later used for auditing and Error Tracking. I am using fprintf to print the results of Matlab operations on the console.
Example: fprintf('Post-processing results...');
Currently, the output is logged on to the Java console. I want to ensure that 'Post-processing results...' is outputted to the log file which is controlled from the Java application.
I am using java.util.logging for Java logging.
Could you please let me know what are the ways in which this can be done?
Thanks,
Jayaram
  2 Comments
Andreas
Andreas on 19 Nov 2016
Hello, did you a solution to your problem so far? Are you using the matlab function directly from java (with the new java/matlab-API) or do you use a compiled jar-file containing the matlab code?
Any idea/solution would be quite helpful, as I have to same need.
Thank you
Andreas

Sign in to comment.

Answers (0)

Categories

Find more on Java Package Integration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!