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

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

Merged
merged 3 commits into from Apr 16, 2018

Conversation

@dginev
Copy link
Collaborator

dginev commented Apr 13, 2018

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

@@ -255,7 +256,6 @@ sub convert {
my ($state) = @_; # Remove current state frame
$$opts{searchpaths} = $state->lookupValue('SEARCHPATHS'); # save the searchpaths for post-processing
$state->popDaemonFrame;
$$state{status} = {};

This comment has been minimized.

Copy link
@dginev

dginev Apr 13, 2018

Author Collaborator

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.

$$status{$type}{$subtype} += $$table{$subtype};
}
} else {
$$status{$type} ||= 0;

This comment has been minimized.

Copy link
@dginev

dginev Apr 13, 2018

Author Collaborator

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

This comment has been minimized.

Copy link
@dginev

dginev Apr 13, 2018

Author Collaborator

works just fine without them naturally

@brucemiller

This comment has been minimized.

Copy link
Owner

brucemiller commented Apr 15, 2018

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

@dginev

This comment has been minimized.

Copy link
Collaborator Author

dginev commented Apr 15, 2018

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

@brucemiller

This comment has been minimized.

Copy link
Owner

brucemiller commented Apr 16, 2018

Cool! Thanks!!

@brucemiller brucemiller reopened this Apr 16, 2018
@brucemiller brucemiller merged commit dad3b26 into brucemiller:master Apr 16, 2018
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@dginev dginev deleted the dginev:bib-post-processing-log branch Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.