{"record":{"id":"f096ccd7a753af7d","repo":"fluent/fluentd","slug":"ruby-dsl-configuration-format-is-deprecated-pleas","errorCode":null,"errorMessage":"Ruby DSL configuration format is deprecated. Please use original configuration format. https://docs.fluentd.org/configuration/config-file","messagePattern":"Ruby DSL configuration format is deprecated\\. Please use original configuration format\\. https://docs\\.fluentd\\.org/configuration/config-file","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"lib/fluent/config.rb","lineNumber":78,"sourceCode":"                 when :v1 then :v1\n                 when :v0 then :v0\n                 else\n                   raise ArgumentError, \"Unknown Fluentd configuration syntax: '#{syntax}'\"\n                 end\n               elsif v1_config then :v1\n               else :v0\n               end\n      case parser\n      when :v1\n        require 'fluent/config/v1_parser'\n        V1Parser.parse(str, fname, basepath, Kernel.binding, on_file_parsed: on_file_parsed)\n      when :v0\n        # TODO: show deprecated message in v1\n        require 'fluent/config/parser'\n        Parser.parse(str, fname, basepath)\n      when :ruby\n        require 'fluent/config/dsl'\n        $log.warn(\"Ruby DSL configuration format is deprecated. Please use original configuration format. https://docs.fluentd.org/configuration/config-file\") if $log\n        Config::DSL::Parser.parse(str, File.join(basepath, fname))\n      else\n        raise \"[BUG] unknown configuration parser specification:'#{parser}'\"\n      end\n    end\n\n    def self.new(name = '')\n      Element.new(name, '', {}, [])\n    end\n  end\nend\n","sourceCodeStart":60,"sourceCodeEnd":90,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/config.rb#L60-L90","documentation":"Fluentd supports parsing configuration in a Ruby DSL (files interpreted with eval via Config::DSL::Parser), but that format is deprecated. This warning is printed once by Fluent::Config.parse whenever it is invoked with parser: :ruby (e.g. `fluentd -c fluent.conf.rb`) before the DSL parser runs. The config still loads; only a migration to the standard directive-based format is requested.","triggerScenarios":"Running `fluentd -c somefile.rb`, passing a Ruby DSL config to Fluent::Config.parse(str, fname, basepath, parser: :ruby), or using tools (fluentd-ui, supervision wrappers) that select the :ruby parser.","commonSituations":"Legacy deployments from early Fluentd v0.x era still shipping .rb configs; copied examples from old blog posts; CI pipelines validating configs via the ruby parser.","solutions":["Rewrite the configuration in the standard @type/directive format documented at https://docs.fluentd.org/configuration/config-file.","Rename the file so it is not picked up as Ruby DSL (drop the .rb convention and the ruby parser selection).","If you call Config.parse programmatically, stop passing parser: :ruby (use :v1, the default).","Audit deployment tooling for hardcoded `-c fluentd.conf.rb` invocations."],"exampleFix":"# before (fluent.conf.rb, Ruby DSL)\nsource do\n  type :tail\n  path '/var/log/app.log'\n  tag app.log\nend\n\n# after (fluent.conf, standard format)\n<source>\n  @type tail\n  path /var/log/app.log\n  tag app.log\n</source>","handlingStrategy":"validation","validationCode":"# Fail CI if any Fluentd config still uses the Ruby DSL\nrequire 'rbconfig'\nconfigs = Dir.glob(['conf/*.rb', 'etc/*.rb'])\nabort 'Ruby DSL configs are deprecated: ' + configs.join(', ') unless configs.empty?","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Standardize on the directive-based config format for all new services.","Never pass parser: :ruby to Fluent::Config.parse in tooling.","Keep config file extensions non-.rb so DSL parsing cannot be selected accidentally."],"tags":["configuration","deprecation","ruby-dsl"],"backgroundTag":"deprecated-config-format","analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}