Hi Matthew,

Yes, starting with version 1.9 you can enable or disable specific loggers
in the settings.yaml file.
Specifically for SQL logging, you can add the following lines:
:loggers:
  :sql:
    :enabled: false

You can take a look at [1] for more details.


[1] https://theforeman.org/manuals/1.11/index.html#loggers

On Sun, Jul 10, 2016 at 3:30 AM, Matthew Ceroni <[email protected]>
wrote:

> Is there a way I can enable debugging such that it shows the queries being
> made against the DB?
>
> The associate VM (from an OpenStack compute resource) ends up picking the
> wrong host, every time. I tried looking at the code but not sure exactly
> what it is doing. It appears to be trying to match on the
> floating_ip_address or private_ip_address. Would live to see what values it
> is using for those if possible.
>
> Assuming this is the code called in the openstack.rb file:
>
> def associated_host(vm)
> associate_by("ip", [vm.floating_ip_address, vm.private_ip_address])
> end
>
> def associate_by(name, attributes) Host.authorized(:view_hosts, Host
> ).joins(:primary_interface). where(:nics => {:primary => true}). where("
> nics.#{name}" => attributes). readonly(false). first end The VM and host
> have neither the same MAC or IP.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "foreman-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Have a nice day,
Tomer Brisker
Red Hat Engineering

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to