Project

General

Profile

« Previous | Next » 

Revision 0af9cada

Added by Marc Dequènes almost 16 years ago

  • ID 0af9cada817613d9ecb5131061941fea6e12310e

[evol] move LDAP settings out of code and use global logger

View differences:

postman
end
end
ldap_config = {
:host => 'localhost',
:port => 389,
:base => 'dc=milkypond,dc=org',
:bind_dn => 'cn=srv-auth,dc=milkypond,dc=org',
:password => 'teckLetsoaj5',
:logger => logger,
:allow_anonymous => false,
:try_sasl => false,
#:method => :tls,
:scope => :sub
}
ActiveLdap::Base.establish_connection(ldap_config)
class DnsDomain < Delegator
attr_reader :name
......
Config.load(self.human_name.downcase)
@config = Config.instance
ldap_config = @config.ldap
ldap_config.logger = logger
ActiveLdap::Base.establish_connection(ldap_config.marshal_dump)
# setup logs
unless @config.log.nil?
logger.output_level(@config.log.console_level) unless @config.log.console_level.nil?

Also available in: Unified diff