[horizon] how to get horizon related logs to syslog?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[horizon] how to get horizon related logs to syslog?

Tikkanen, Viktor (Nokia - FI/Espoo)
Hi!
 
For most openstack parts (e.g. Aodh, Cinder, Glance, Heat, Ironic, Keystone, Neutron, Nova) it was easy to get logs to syslog.
 
For example for Heat something similar to this (into file templates/heat.conf.j2):
 
# Syslog usage
{% if heat_syslog_enabled %}
use_syslog = True
syslog_log_facility = LOG_LOCAL3
{% else %}
log_file = /var/log/heat/heat.log
{% endif %}
 
But how to get Horizon related logs to syslog?
 
-V.
 

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [hidden email]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Reply | Threaded
Open this post in threaded view
|

Re: [horizon] how to get horizon related logs to syslog?

Akihiro MOTOKI-2
Hi, 

Horizon logging depends on Django configuration which supports full python logging [1].
[1] does not provide enough examples.
Perhaps [2] will help you (though I haven't tested it).


Thanks,
Akihiro

2018年11月16日(金) 18:47 Tikkanen, Viktor (Nokia - FI/Espoo) <[hidden email]>:
Hi!
 
For most openstack parts (e.g. Aodh, Cinder, Glance, Heat, Ironic, Keystone, Neutron, Nova) it was easy to get logs to syslog.
 
For example for Heat something similar to this (into file templates/heat.conf.j2):
 
# Syslog usage
{% if heat_syslog_enabled %}
use_syslog = True
syslog_log_facility = LOG_LOCAL3
{% else %}
log_file = /var/log/heat/heat.log
{% endif %}
 
But how to get Horizon related logs to syslog?
 
-V.
 
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@...?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [hidden email]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Reply | Threaded
Open this post in threaded view
|

Re: [horizon] how to get horizon related logs to syslog?

Doug Hellmann-2
Akihiro Motoki <[hidden email]> writes:

> Hi,
>
> Horizon logging depends on Django configuration which supports full python
> logging [1].
> [1] does not provide enough examples.
> Perhaps [2] will help you (though I haven't tested it).

Based on https://docs.djangoproject.com/en/2.1/topics/logging/ it looks
like it should be possible to have Horizon's settings module disable
Django's logging configuration and call oslo.log to do that
configuration. I wonder if it would make sense to do that, for
consistency with the other services?

Doug


>
> [1] https://docs.djangoproject.com/en/2.0/topics/logging/
> [2]
> https://www.simonkrueger.com/2015/05/27/logging-django-apps-to-syslog.html
>
> Thanks,
> Akihiro
>
> 2018年11月16日(金) 18:47 Tikkanen, Viktor (Nokia - FI/Espoo) <
> [hidden email]>:
>
>> Hi!
>>
>> For most openstack parts (e.g. Aodh, Cinder, Glance, Heat, Ironic,
>> Keystone, Neutron, Nova) it was easy to get logs to syslog.
>>
>> For example for Heat something similar to this (into file
>> templates/heat.conf.j2):
>>
>> # Syslog usage
>> {% if heat_syslog_enabled %}
>> use_syslog = True
>> syslog_log_facility = LOG_LOCAL3
>> {% else %}
>> log_file = /var/log/heat/heat.log
>> {% endif %}
>>
>> But how to get Horizon related logs to syslog?
>>
>> -V.
>>
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: [hidden email]?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: [hidden email]?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

--
Doug

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [hidden email]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev