Skip to content

startup logging - #999

Merged
bengl merged 11 commits into
masterfrom
bengl/startuplogging
Jul 2, 2020
Merged

startup logging#999
bengl merged 11 commits into
masterfrom
bengl/startuplogging

Conversation

@bengl

@bengl bengl commented Jun 25, 2020

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds standardized startup logging as soon as we have enough information to do so.

Motivation

Help support get as much information as they can from app startup logs.

@bengl
bengl requested a review from a team as a code owner June 25, 2020 19:25
@bengl
bengl force-pushed the bengl/startuplogging branch 3 times, most recently from 65f60fe to c8add2a Compare June 29, 2020 19:32
@bengl bengl changed the title [WIP] startup logging startup logging Jun 29, 2020
@bengl
bengl requested a review from rochdev June 29, 2020 19:34
@bengl
bengl force-pushed the bengl/startuplogging branch from c8add2a to dd91773 Compare June 29, 2020 19:54
@bengl
bengl force-pushed the bengl/startuplogging branch from dd91773 to a14a2db Compare June 29, 2020 21:17
Comment thread packages/dd-trace/src/priority_sampler.js Outdated
Comment thread packages/dd-trace/src/proxy.js Outdated
Comment thread packages/dd-trace/src/startup-log.js Outdated
Comment thread packages/dd-trace/src/startup-log.js Outdated
Comment thread packages/dd-trace/src/startup-log.js Outdated
Comment thread packages/dd-trace/src/startup-log.js Outdated
Comment thread packages/dd-trace/src/startup-log.js Outdated
Comment thread packages/dd-trace/src/log.js Outdated
Comment thread packages/dd-trace/src/log.js
Comment thread packages/dd-trace/src/startup-log.js Outdated
@rochdev rochdev added the core label Jun 29, 2020
Comment thread packages/dd-trace/src/log.js Outdated
Comment on lines +4 to +7
debug: (...args) => console.log(...args), /* eslint-disable-line no-console */
info: (...args) => console.error(...args), /* eslint-disable-line no-console */
warn: (...args) => console.error(...args), /* eslint-disable-line no-console */
error: (...args) => console.error(...args) /* eslint-disable-line no-console */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we could use more specific console methods:

Suggested change
debug: (...args) => console.log(...args), /* eslint-disable-line no-console */
info: (...args) => console.error(...args), /* eslint-disable-line no-console */
warn: (...args) => console.error(...args), /* eslint-disable-line no-console */
error: (...args) => console.error(...args) /* eslint-disable-line no-console */
debug: console.debug, /* eslint-disable-line no-console */
info: console.info, /* eslint-disable-line no-console */
warn: console.warn, /* eslint-disable-line no-console */
error: console.error /* eslint-disable-line no-console */

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I tried, but this breaks the tests, which stub console. Roch's suggesting of stubbing higher up at the logger would solve this though.

@bengl
bengl force-pushed the bengl/startuplogging branch from b284c29 to 7744a39 Compare July 1, 2020 17:43
@rochdev rochdev added this to the 0.23.0 milestone Jul 2, 2020
@bengl
bengl merged commit 0156864 into master Jul 2, 2020
dandean added a commit to dandean/dd-trace-js that referenced this pull request Aug 21, 2020
PR DataDog#999 added startup logging. In doing so it added support for additional logging methods.
rochdev pushed a commit that referenced this pull request Aug 24, 2020
* Fix TypeScript type definitions for logger config

PR #999 added startup logging. In doing so it added support for additional logging methods.

* Update markdown docs for logger

* fix typescript unit tests
@tlhunter
tlhunter deleted the bengl/startuplogging branch January 19, 2024 22:16
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