Skip to content

Conversation

@egilmorez
Copy link
Contributor

Adding logger SDK to reference docs, with some edits.

Staged internally at: https://firebase.devsite.corp.google.com/docs/reference/functions/logger_

Thanks!

@egilmorez egilmorez removed the request for review from rachelsaunders June 23, 2020 00:37
@egilmorez
Copy link
Contributor Author

egilmorez commented Jun 23, 2020

Correction on internal staging link -- it ends with an underscore, and because that gets stripped, we need to spell it out: https://firebase.devsite.corp.google.com/docs/reference/functions/logger_.html

@mbleigh
Copy link
Contributor

mbleigh commented Jun 23, 2020 via email

/**
* Writes a `LogEntry` to `stdout`/`stderr` (depending on severity).
* @param entry The LogEntry including severity, message, and any additional structured metadata.
* @param entry The `LogEntry` including severity, message, and any additional structured metadata.
Copy link
Contributor

Choose a reason for hiding this comment

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

Will the LogEntry type show up in the reference? Can we link to it? Or maybe that happens automatically since it's an argument for the function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup! TypeDoc creates a link for that.

/**
* Writes a `DEBUG` severity log. If the last argument provided is a plain object,
* it will be added to the `jsonPayload` in the Cloud Logging entry.
* it is added to the `jsonPayload` in the Cloud Logging entry.
Copy link
Contributor

Choose a reason for hiding this comment

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

Here's a link to an explanation of jsonPayload: https://cloud.google.com/logging/docs/structured-logging

Not sure if that's TMI though

If added, this applies to all comments that mention jsonPayload

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, that's a good reference for the guide material, as well as for a top-level comment for logger -- which I should probably add to the main page here.

@egilmorez
Copy link
Contributor Author

Michael has a really good question about the underscores . . . there is probably some work we can do in the docgen script to clean up the file names, similar to what we've done with the Web SDK TypeDoc script.

@egilmorez egilmorez merged commit f9b24e0 into master Jun 23, 2020
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.

4 participants