Skip to content

Integrate logs from separate bibliography converts in post-processing#969

Merged
brucemiller merged 3 commits into
brucemiller:masterfrom
dginev:bib-post-processing-log
Apr 16, 2018
Merged

Integrate logs from separate bibliography converts in post-processing#969
brucemiller merged 3 commits into
brucemiller:masterfrom
dginev:bib-post-processing-log

Conversation

@dginev

@dginev dginev commented Apr 13, 2018

Copy link
Copy Markdown
Collaborator

Fixes #916

A bit tricky, since managing the STDERR redirects is getting wild, but it works nicely. Unsure about the final log to print, attaching screenshots with this version. I did not want to indent the messages, so that automated regexes (e.g. from cortex) can still parse the log as usual.

Here are the logs converting the the issue example, with master:

master

And the logs after this PR is installed:

new

Comment thread lib/LaTeXML.pm
my ($state) = @_; # Remove current state frame
$$opts{searchpaths} = $state->lookupValue('SEARCHPATHS'); # save the searchpaths for post-processing
$state->popDaemonFrame;
$$state{status} = {};

@dginev dginev Apr 13, 2018

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was the only place I had to touch the actual daemon core logic.

In essence, instead of immediately reset-ing the status hash after a conversion run is completed, I now reset it before a fresh run is started. This way I can still reuse the hash for passing on the status numbers to a parent converter object.

Comment thread lib/LaTeXML/Common/Error.pm Outdated
$$status{$type}{$subtype} += $$table{$subtype};
}
} else {
$$status{$type} ||= 0;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have gotten used to being extra cautious from my Ruby days, let me know if you want these guards back @brucemiller

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works just fine without them naturally

@brucemiller

Copy link
Copy Markdown
Owner

Looks good; let me know when you're done :>

@dginev

dginev commented Apr 15, 2018

Copy link
Copy Markdown
Collaborator Author

Oh, i am done here. Feel free to review and merge.

@brucemiller

Copy link
Copy Markdown
Owner

Cool! Thanks!!

@brucemiller brucemiller reopened this Apr 16, 2018
@brucemiller
brucemiller merged commit dad3b26 into brucemiller:master Apr 16, 2018
@dginev
dginev deleted the bib-post-processing-log branch April 16, 2018 12:17
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

Successfully merging this pull request may close these issues.

2 participants