Skip to content

Makes "logger/compat" more focused on compatibility. Fixes #697 #701

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

Merged
merged 4 commits into from
Jun 9, 2020

Conversation

mbleigh
Copy link
Contributor

@mbleigh mbleigh commented Jun 9, 2020

Refactors the implementation of logger/compat to be a simple straightforward "frontport" of Node 8 logging to newer runtimes. This should make it easier for folks migrating to Node 10 to use as a drop-in fix for logging while they migrate to the logger package over the long-term.

Driven by discussion in #697

CHANGELOG.md Outdated

```js
require('firebase-functions/logger/compat');
```

In older runtimes, logger prints to the console, and no structured data is saved.
In new runtimes, requiring this will emit text logs with multi-line support and appropriate severity.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions to clarify in the changelog:

  • Will it do anything in older runtimes?
  • Specify that "new runtimes" refer to > Node.js 10

@mbleigh mbleigh merged commit c26ed9e into master Jun 9, 2020
@mbleigh mbleigh deleted the mb-compat-string branch June 9, 2020 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants