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

Removed dependency on cloud-diagnostics-common #338

Merged
merged 8 commits into from
Jan 5, 2017

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
@@ -125,7 +126,18 @@ var publicAgent = {
if (!config.enabled) {
return this;
}
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.

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

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.

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.

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.

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 join this conversation on GitHub. Already have an account? Sign in to comment
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