Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Conversation

@kjin
Copy link
Contributor

@kjin kjin commented Dec 28, 2016

Removed all dependencies on cloud-diagnostics-common, replacing with equivalent functionality in cloud-common.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 28, 2016
index.js Outdated
}
var logger = common.logger.create(config.logLevel, '@google/cloud-trace');

var logLevel = config.logLevel || 2;

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

var logger = common.logger.create(config.logLevel, '@google/cloud-trace');

var logLevel = config.logLevel || 2;
if (logLevel < 0) {

This comment was marked as spam.

index.js Outdated
var logLevel = config.logLevel || 2;
if (logLevel < 0) {
logLevel = 0;
} else if (logLevel > 4) {

This comment was marked as spam.

@kjin
Copy link
Contributor Author

kjin commented Dec 29, 2016

Addressed inconsistencies in log levels here: googleapis/google-cloud-node#1900

index.js Outdated
try {
config.logLevel = parseInt(process.env.GCLOUD_TRACE_LOGLEVEL);
} catch (e) {
// Just use the original log level if GCLOUD_TRACE_LOGLEVEL is malformed.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

index.js Outdated
util._extend(config, projectConfig);
if (process.env.hasOwnProperty('GCLOUD_TRACE_LOGLEVEL')) {
if (process.env.GCLOUD_TRACE_LOGLEVEL.match(/^\d+$/)) {
config.logLevel = parseInt(process.env.GCLOUD_TRACE_LOGLEVEL);

This comment was marked as spam.

This comment was marked as spam.

index.js Outdated
util._extend(config, require('./config.js').trace);
util._extend(config, projectConfig);
if (process.env.hasOwnProperty('GCLOUD_TRACE_LOGLEVEL')) {
if (process.env.GCLOUD_TRACE_LOGLEVEL.match(/^\d+$/)) {

This comment was marked as spam.

This comment was marked as spam.

index.js Outdated
if (!logLevelValid) {
var desiredLogLevel = process.env.GCLOUD_TRACE_LOGLEVEL ||
config.logLevel;
logger.warn('Provided log level ' + desiredLogLevel + ' is invalid, ' +

This comment was marked as spam.

This comment was marked as spam.

// The contents of a key file. If this field is set, its contents will be
// used for authentication instead of your application default credentials.
credentials: null,

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@kjin kjin merged commit 8aed09d into googleapis:master Jan 5, 2017
@ofrobots ofrobots added the semver: major Hint for users that this is an API breaking change. label Jan 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement. semver: major Hint for users that this is an API breaking change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants