Log platform info on startup

This commit is contained in:
JonnyWong16 2018-05-10 08:47:54 -07:00
parent e91ba46265
commit 7c76b0678a
4 changed files with 18 additions and 5 deletions

View file

@ -69,7 +69,7 @@ DOCUMENTATION :: END
% endif % endif
<tr> <tr>
<td>Platform:</td> <td>Platform:</td>
<td>${common.PLATFORM} ${common.PLATFORM_VERSION}</td> <td>${common.PLATFORM} ${common.PLATFROM_RELEASE} (${common.PLATFORM_VERSION + (' - {}'.format(common.PLATFORM_LINUX_DISTRO) if common.PLATFORM_LINUX_DISTRO else '')})</td>
</tr> </tr>
<tr> <tr>
<td>Python Version:</td> <td>Python Version:</td>

View file

@ -152,6 +152,17 @@ def initialize(config_file):
logger.initLogger(console=not QUIET, log_dir=CONFIG.LOG_DIR, logger.initLogger(console=not QUIET, log_dir=CONFIG.LOG_DIR,
verbose=VERBOSE) verbose=VERBOSE)
logger.info(u"Starting Tautulli {}".format(
common.RELEASE
))
logger.info(u"{} {} ({}{})".format(
common.PLATFORM, common.PLATFROM_RELEASE, common.PLATFORM_VERSION,
' - {}'.format(common.PLATFORM_LINUX_DISTRO) if common.PLATFORM_LINUX_DISTRO else ''
))
logger.info(u"Python {}".format(
sys.version
))
if not CONFIG.BACKUP_DIR: if not CONFIG.BACKUP_DIR:
CONFIG.BACKUP_DIR = os.path.join(DATA_DIR, 'backups') CONFIG.BACKUP_DIR = os.path.join(DATA_DIR, 'backups')
if not os.path.exists(CONFIG.BACKUP_DIR): if not os.path.exists(CONFIG.BACKUP_DIR):
@ -1812,7 +1823,7 @@ def initialize_tracker():
'appVersion': common.RELEASE, 'appVersion': common.RELEASE,
'appId': plexpy.INSTALL_TYPE, 'appId': plexpy.INSTALL_TYPE,
'appInstallerId': plexpy.CONFIG.GIT_BRANCH, 'appInstallerId': plexpy.CONFIG.GIT_BRANCH,
'dimension1': '{} {}'.format(common.PLATFORM, common.PLATFORM_VERSION), # App Platform 'dimension1': '{} {}'.format(common.PLATFORM, common.PLATFROM_RELEASE), # App Platform
'userLanguage': plexpy.SYS_LANGUAGE, 'userLanguage': plexpy.SYS_LANGUAGE,
'documentEncoding': plexpy.SYS_ENCODING, 'documentEncoding': plexpy.SYS_ENCODING,
'noninteractive': True 'noninteractive': True

View file

@ -20,11 +20,13 @@ import version
# Identify Our Application # Identify Our Application
PLATFORM = platform.system() PLATFORM = platform.system()
PLATFORM_VERSION = platform.release() PLATFROM_RELEASE = platform.release()
PLATFORM_VERSION = platform.version()
PLATFORM_LINUX_DISTRO = ' '.join(x for x in platform.linux_distribution() if x)
BRANCH = version.PLEXPY_BRANCH BRANCH = version.PLEXPY_BRANCH
RELEASE = version.PLEXPY_RELEASE_VERSION RELEASE = version.PLEXPY_RELEASE_VERSION
USER_AGENT = 'Tautulli/{} ({} {})'.format(RELEASE, PLATFORM, PLATFORM_VERSION) USER_AGENT = 'Tautulli/{} ({} {})'.format(RELEASE, PLATFORM, PLATFROM_RELEASE)
DEFAULT_USER_THUMB = "interfaces/default/images/gravatar-default-80x80.png" DEFAULT_USER_THUMB = "interfaces/default/images/gravatar-default-80x80.png"
DEFAULT_POSTER_THUMB = "interfaces/default/images/poster.png" DEFAULT_POSTER_THUMB = "interfaces/default/images/poster.png"

View file

@ -43,7 +43,7 @@ class HTTPHandler(object):
'X-Plex-Product': 'Tautulli', 'X-Plex-Product': 'Tautulli',
'X-Plex-Version': plexpy.common.RELEASE, 'X-Plex-Version': plexpy.common.RELEASE,
'X-Plex-Platform': plexpy.common.PLATFORM, 'X-Plex-Platform': plexpy.common.PLATFORM,
'X-Plex-Platform-Version': plexpy.common.PLATFORM_VERSION, 'X-Plex-Platform-Version': plexpy.common.PLATFROM_RELEASE,
'X-Plex-Client-Identifier': plexpy.CONFIG.PMS_UUID, 'X-Plex-Client-Identifier': plexpy.CONFIG.PMS_UUID,
} }