question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

potential for black-holing log messages via transitive dependency on gulplog

See original GitHub issue

gulp-util.log checks for hasGulplog on module initialization and if present, defers logging to gulplog.info, which in turn will eat any messages below error (I believe) unless there is explicitly an event handler for the other levels (info, warn, etc.).

This can happen ‘accidentally’ if a transitive dependency uses gulplog.

It seems like the reasonable thing to do is to use gulplog.error to ensure all logging is output properly.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ischneidercommented, Jan 19, 2016

However, I think you might actually be saying that some dependency is using gulplog, which makes it available in the global scope but you aren’t using the new gulp-cli, so no logs are being logged. Is that correct?

Correct and I can verify that using the gulp executable from gulp-cli produces the desired behavior, i.e. gulp-util.log produces output even when gulplog is present.

This is fine longer term, but it seems like a potential problem for the unaware - case in point: me and my time lost 😦

Super simple example

require('gulplog');
require('gulp-util').log('foobar');

When run using global gulp, no ‘foobar’. When using locally installed gulp from gulp-cli, ‘foobar’ is logged.

Thanks 😄

1reaction
phatedcommented, Feb 1, 2018

This problem won’t be solved until we get the community transferred off gulp installed globally and installing gulp-cli instead ☹️

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found