mirror of
https://github.com/ansible/awx.git
synced 2026-03-21 19:07:39 -02:30
Revert "Merge pull request #5527 from chrismeyersfsu/fix-log_settings"
This reverts commit 3db0242ef9a8b1ce67e159b8a19e0c1e70330b7c, reversing changes made to e6893bb7f3cf696c202c39103b432c20afa6ec08.
This commit is contained in:
@@ -2,11 +2,9 @@
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import uuid
|
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.conf import settings
|
|
||||||
|
|
||||||
# Tower
|
# Tower
|
||||||
from awx.conf import fields, register
|
from awx.conf import fields, register
|
||||||
@@ -316,20 +314,13 @@ register(
|
|||||||
category=_('Logging'),
|
category=_('Logging'),
|
||||||
category_slug='logging',
|
category_slug='logging',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def init_LOG_AGGREGATOR_TOWER_UUID():
|
|
||||||
unique_id = uuid.uuid4()
|
|
||||||
settings.LOG_AGGREGATOR_TOWER_UUID = unique_id
|
|
||||||
return unique_id
|
|
||||||
|
|
||||||
|
|
||||||
register(
|
register(
|
||||||
'LOG_AGGREGATOR_TOWER_UUID',
|
'LOG_AGGREGATOR_TOWER_UUID',
|
||||||
field_class=fields.CharField,
|
field_class=fields.CharField,
|
||||||
|
allow_blank=True,
|
||||||
label=_('Cluster-wide Tower unique identifier.'),
|
label=_('Cluster-wide Tower unique identifier.'),
|
||||||
help_text=_('Useful to uniquely identify Tower instances.'),
|
help_text=_('Useful to uniquely identify Tower instances.'),
|
||||||
category=_('Logging'),
|
category=_('Logging'),
|
||||||
category_slug='logging',
|
category_slug='logging',
|
||||||
default=init_LOG_AGGREGATOR_TOWER_UUID,
|
default=None,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class BaseHTTPSHandler(logging.Handler):
|
|||||||
self.session.headers.update(headers)
|
self.session.headers.update(headers)
|
||||||
|
|
||||||
def get_http_host(self):
|
def get_http_host(self):
|
||||||
host = self.host or ''
|
host = self.host
|
||||||
if not host.startswith('http'):
|
if not host.startswith('http'):
|
||||||
host = 'http://%s' % self.host
|
host = 'http://%s' % self.host
|
||||||
if self.port != 80 and self.port is not None:
|
if self.port != 80 and self.port is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user