Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "Invalid file identifier" #14

Open
apw10 opened this issue Dec 20, 2017 · 0 comments
Open

Error "Invalid file identifier" #14

apw10 opened this issue Dec 20, 2017 · 0 comments

Comments

@apw10
Copy link

apw10 commented Dec 20, 2017

Hello,

I use Matlab 2017b at Windows 7 and I used the logger in the following way

[~, tmp_name] = fileparts(tempname);
General.LogFileName = fullfile(General.OUTDIR,['AnalyzeLog_' tmp_name '.log']);
fprintf(2,[regexprep(General.LogFileName,'\','\\\') '\n']);
Lg =  logging.getLogger('mylogger', 'path', General.LogFileName);
Lg.setLogLevel(logging.logging.ALL);
Lg.setCommandWindowLevel(logging.logging.ALL);

At a certain time point of the function I get the following error message.

Error using fprintf
Invalid file identifier.  Use fopen to generate a valid file identifier.

Error in logging/writeLog (line 173)
        fprintf(self.logfid, logline);

Error in logging/info (line 104)
      self.writeLog(self.INFO, caller_name, message);

Error in dataComb (line 5)

during a simply task
Lg.info(['color ' int2str(kcolor) '_' curr_col]);

Thank you

@apw10 apw10 changed the title Error "Invalid file identifier" (adapted logging4matlab-version) Error "Invalid file identifier" Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant