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.

Cannot get the plugin to log an error

See original GitHub issue

I have a handful of CSS files that I would expect to error. One has the following class:

.blah-plsPls__asdasd_--ad {
  color: #fff;
}

I’m using the following code, slightly modified from this project’s README:

'use strict';

const fs = require('fs');
const recursive = require('recursive-readdir');
const postcss = require('postcss');
const bemLinter = require('postcss-bem-linter');
const reporter = require('postcss-reporter');

recursive('client', ['!*.css'], (err, files) => {
  files.forEach(file => {
    const css = fs.readFileSync(file, 'utf-8');
    postcss()
      .use(bemLinter('bem'))
      .use(reporter())
      .process(css, { from: null });
  });
});

It’s successfully grabbing all of the files (which I confirmed by adding .then(results => console.log(results);, but it never logs any warnings.

Am I missing something obvious here? 🙂

Thanks for reading!


Versions:

postcss: 6.0.16 postcss-bem-linter 3.1.0 postcss-reporter 5.0.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
simonsmithcommented, Apr 16, 2018

Okay cool, sorry for the delay! 😄

0reactions
jamespleasecommented, Apr 16, 2018

I was never able to get this working, but I haven’t had a chance to try again. I’ll close this out for now. If I have the time to look into it again, and still face problems, I’ll reopen this.

thanks for the follow up!

Read more comments on GitHub >

github_iconTop Results From Across the Web

I cannot find the logging for my plugin - Google Groups
Hi, I have made a plugin ( that works most of the time). I have added logging using: private static final Logger LOG...
Read more >
How to Set Up WordPress Error Logs to Detect Issues (So You ...
Using a plugin to find your error log can be an easier and faster method, ... If you can't see the dashboard widget,...
Read more >
Error Log Monitor – WordPress plugin
This plugin adds a Dashboard widget that displays the latest messages from your PHP error log. It can also send you email notifications...
Read more >
How to Turn on WordPress Error Log (Using Debug Mode)
Turn on a WordPress error log to identify errors and warnings. Use this to figure out what's wrong with your site and fix...
Read more >
Php errors not logging for wordpress plugins - Stack Overflow
To get a better idea of what was going on, I installed a fresh version of wordpress, broke a plugin, and found that...
Read more >

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