Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

.Net 6 Logging is not grouped anymore #136

Open
j-meds opened this issue Nov 19, 2021 · 5 comments
Open

.Net 6 Logging is not grouped anymore #136

j-meds opened this issue Nov 19, 2021 · 5 comments

Comments

@j-meds
Copy link

j-meds commented Nov 19, 2021

In .Net 3.1 and 5 the logging was grouped into one message. Now each line is an info message from VueCliMiddleWare, it's not good for debugging.
image

@SomeoneIsWorking
Copy link

For me, webpack progress is also written to logs as error even though there are no errors.

@andrew-smythe
Copy link

For me, webpack progress is also written to logs as error even though there are no errors.

This is happening for me too. In previous versions, these would not be logged as errors. Since I have a serilog sink on my project to send e-mails for logged errors, I get ~33 emails every time I fire up my project locally. I can reduce it to only one by using:

// vue.config.js
module.exports = {
    ...
    devServer: {
        progress: false,
    },
    ...
}

This just trims out the progress, which I still might want to see in the console output.

@SomeoneIsWorking
Copy link

I alleviated the problem by excluding the logs from Serilog with conditional

    private static bool IsCliLog(LogEvent logEvent)
    {
        return logEvent.Properties.TryGetValue("SourceContext", out var val) &&
               val is ScalarValue sv &&
               sv.Value is string svs &&
               svs == "VueCliMiddleware";
    }

But after upgrading to @vue/cli-service 5 the logs are not written as error anymore I think, because webpack version upgrade
I still keep this code to not include webpack logs in the log file

@j-meds
Copy link
Author

j-meds commented Mar 4, 2022

Thanks for this, I'll try the upgrade first to see if it's resolved.

@gtbuchanan
Copy link

The error logging is occurring because Webpack logs diagnostics (including progress) to stderr by default. You can change the behavior of Webpack 5 by setting the stream option. Nonetheless, this doesn't help with the individual line logging.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants