Skip to content

Commit

Permalink
fix: change loglevel for beta (#856)
Browse files Browse the repository at this point in the history
* fix: change loglevel for beta

closes #578

Signed-off-by: Olivier Albertini <[email protected]>

* test: update to  new default LogLevel

Signed-off-by: Olivier Albertini <[email protected]>
  • Loading branch information
OlivierAlbertini authored Mar 13, 2020
1 parent 11be782 commit d6b2e62
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/opentelemetry-core/src/common/ConsoleLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { Logger } from '@opentelemetry/api';
import { LogLevel } from './types';

export class ConsoleLogger implements Logger {
constructor(level: LogLevel = LogLevel.DEBUG) {
constructor(level: LogLevel = LogLevel.INFO) {
if (level >= LogLevel.DEBUG) {
this.debug = (...args) => {
console.debug(...args);
Expand Down
2 changes: 0 additions & 2 deletions packages/opentelemetry-core/test/common/ConsoleLogger.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ describe('ConsoleLogger', () => {
assert.deepStrictEqual(warnCalledArgs, ['warn called %s', 'param1']);
consoleLogger.info('info called %s', 'param1');
assert.deepStrictEqual(infoCalledArgs, ['info called %s', 'param1']);
consoleLogger.debug('debug called %s', 'param1');
assert.deepStrictEqual(debugCalledArgs, ['debug called %s', 'param1']);
});

it('should log with debug', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-metrics/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export interface MeterConfig {

/** Default Meter configuration. */
export const DEFAULT_CONFIG = {
logLevel: LogLevel.DEBUG,
logLevel: LogLevel.INFO,
};

/** The default metric creation options value. */
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-tracing/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const DEFAULT_MAX_LINKS_PER_SPAN = 32;
*/
export const DEFAULT_CONFIG = {
defaultAttributes: {},
logLevel: LogLevel.DEBUG,
logLevel: LogLevel.INFO,
sampler: ALWAYS_SAMPLER,
traceParams: {
numberOfAttributesPerSpan: DEFAULT_MAX_ATTRIBUTES_PER_SPAN,
Expand Down

0 comments on commit d6b2e62

Please sign in to comment.