Skip to content

Logging queue hangs and statements aren't logged with version >= 5 #858

Open
@millerds

Description

@millerds

I'm using a custom generator that has many "this.log" statements. In a couple of code paths, I have a method that makes a series of log calls. One gets called from "initializing" and one gets called from "end". In those two cases only the first log statement gets output and the rest do not. At the same time, the "tihs.log(yosay(message));" in initializing doesn't prevent other log calls from working and neither does a call to another custom logging method being called under "writing". This started happening after I updated my 'yo' installation to v5 without changing the generator itself.

I debugged into my generator project and can see all the logging statements getting added to the queue but the first statement in those two cases seems to log and then then the queue has an "await" call after calling the log and that isn't getting resolved before all the other statements get logged and the method finished.

Based on the previous observation I awaited all my this.log calls (and made all the methods async) and that seems to work around the problem. I don't believe the log call itself it async so I'm a little confused about how this is working.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions