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

workflow-handler-proxy log level #105

Closed
jabstone opened this issue Feb 15, 2021 · 4 comments
Closed

workflow-handler-proxy log level #105

jabstone opened this issue Feb 15, 2021 · 4 comments

Comments

@jabstone
Copy link
Contributor

jabstone commented Feb 15, 2021

Hello. We're using the postgres persistence transport and it's working awesome. The one thing I wish I could change is the log level when saving a workflow. In the postgres saveWorkFlowData method the log level is set to debug and works fine. However, the workflow-handler-proxy that calls it appears to write logs at the info level. Actually, the real issue is the logger.info in the proxy includes the entire payload. We're persisting a lot of data between workflow handlers and this logger.info call is destroying our log files. :) Is this by design or an oversight? Ideally, the logger.info would log the workflow name and id and the logger.debug would log the payload. Is this something you would consider changing? I'm happy to submit a PR if necessary. Thanks for this awesome project. It works great.

  private async persist (data: TWorkflowData): Promise<void> {
    try {
      await this.persistence.saveWorkflowData(data)
      this.logger.info('Saving workflow data', { data })    //This is killing my poor log files
    } catch (err) {
      this.logger.error('Error persisting workflow data', { err })
      throw err
    }
  }
}
@adenhertog
Copy link
Contributor

hey @jabstone I think you're right - there shouldn't be any need for this to be logging at info. Feel free to raise a PR to downgrade this to trace, or I can get it done over the weekend.

Cheers!

@jabstone
Copy link
Contributor Author

Just submitted a PR. Appreciate the quick reply and help on this issue.

@adenhertog
Copy link
Contributor

Thanks @jabstone - your changes are in @node-ts/bus-workflow 0.6.6

@jabstone
Copy link
Contributor Author

Thank you so much for the quick turnaround. Appreciate it!

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

2 participants