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

Lot's of logging messages #6

Closed
SamDecrock opened this issue Mar 6, 2013 · 3 comments
Closed

Lot's of logging messages #6

SamDecrock opened this issue Mar 6, 2013 · 3 comments

Comments

@SamDecrock
Copy link

I'm seeing lot's of logging messages like these:

6 Mar 11:18:54 - PDFFont2235 - Default - SymbolicFont - (NJTZCI+Constantia-Bold) : 50::NaN => 2 length = 1
6 Mar 11:18:54 - PDFFont2311 - Default - SymbolicFont - (NJTZCI+Constantia-Bold) : 66::NaN => B length = 1
6 Mar 11:18:54 - PDFPageParser19 - page 19 is rendered successfully.
6 Mar 11:18:54 - PDFJSClass1 - start to parse page:20
6 Mar 11:18:54 - PDFPageParser20 - page 20 is rendered successfully.
6 Mar 11:18:54 - PDFJSClass1 - complete parsing page:20

How can I turn them off?

Thanks

@user4815162342
Copy link

Until the developer fixes this, the following is a workaround. Add the following code after requiring PDFParser:

var util = require('util');
util._logN = function() {};

This nullops PDFParser's logging function, which is fortunately attached to the util module so it can be accessed this way. There's still at least one place where it uses console.log instead, which I can't get rid of, but this removes the majority of the problem.

@brianc
Copy link
Contributor

brianc commented Oct 16, 2013

I think at the most, the parser should emit a 'log' event or something. Definitely writing to stderr/stdout is not the preferred way to go. @modesty are you interested in a pull request to fix this?

@modesty
Copy link
Owner

modesty commented Oct 21, 2013

verbosity control for logging is added in v0.5.4, see readme for more details.

@modesty modesty closed this as completed Oct 21, 2013
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

4 participants