GithubHelp home page GithubHelp logo

console-output-datadog's Issues

Initializing using `console-output-datadog` results in `uninitialized constant Console::Output::Datadog (NameError)`

When attempting to use Console with CONSOLE_OUTPUT set to Console::Output::Datadog,Console::Output::Default, I get the following error:

.../ruby/gems/console-1.23.2/lib/console/output.rb:19:in `block in new': uninitialized constant Console::Output::Datadog (NameError)

					Output.const_get(name).new(output, **options)
					      ^^^^^^^^^^
	from .../ruby/gems/console-1.23.2/lib/console/output.rb:18:in `each'
	from .../ruby/gems/console-1.23.2/lib/console/output.rb:18:in `inject'
	from .../ruby/gems/console-1.23.2/lib/console/output.rb:18:in `new'
	from .../ruby/gems/console-1.23.2/lib/console/logger.rb:51:in `default_logger'
	from .../ruby/gems/console-1.23.2/lib/console/logger.rb:60:in `local'
	from .../ruby/gems/fiber-local-1.0.0/lib/fiber/local.rb:45:in `instance'
	from .../ruby/gems/console-1.23.2/lib/console.rb:15:in `logger'
	from .../ruby/gems/falcon-0.42.3/bin/falcon:30:in `rescue in <top (required)>'
	from .../ruby/gems/falcon-0.42.3/bin/falcon:25:in `<top (required)>'
	from .../ruby/bin/falcon:25:in `load'
	from .../ruby/bin/falcon:25:in `<top (required)>'
	from .../ruby/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:58:in `load'
	from .../ruby/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:58:in `kernel_load'
	from .../ruby/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:23:in `run'
	from .../ruby/gems/bundler-2.4.10/lib/bundler/cli.rb:492:in `exec'
	from .../ruby/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from .../ruby/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from .../ruby/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from .../ruby/gems/bundler-2.4.10/lib/bundler/cli.rb:34:in `dispatch'
	from .../ruby/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from .../ruby/gems/bundler-2.4.10/lib/bundler/cli.rb:28:in `start'
	from .../ruby/gems/bundler-2.4.10/exe/bundle:45:in `block in <top (required)>'
	from .../ruby/gems/bundler-2.4.10/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
	from .../ruby/gems/bundler-2.4.10/exe/bundle:33:in `<top (required)>'
	from .../ruby/bin/bundle:25:in `load'
	from .../ruby/bin/bundle:25:in `<main>'

It is being required correctly, as manual initialization of Console::Output::Datadog works just fine.

I was thinking of initializing it manually, but the problem with that approach is that the fiber-local logger is initialized lazily for each fiber, and when it does, it tries to do so using the environment variables again, since the one I initialize manually during the rails app startup is seemingly assigned to Console.logger on a different thread.

Do you have any recommendation on how to proceed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.