Added Splunk task and some more interesting libraries to requirements.txt.

This commit is contained in:
Johannes Findeisen 2023-02-03 03:24:22 +01:00
commit c7b276056c
4 changed files with 38 additions and 10 deletions

View file

@ -29,6 +29,10 @@ logger = getLogger('linspector')
# next 3rd party library in the core (need to discover features because i want log rotating):
# https://pypi.org/project/loguru/
# maybe subclass it from logging.Logger...?
# TODO: Make the logging format using key=value pairs to make it easy to evaluate log data using
# Splunk.
# TODO: Make logging possible to syslog! Maybe not implement it here and just use the syslog task
# with a format optimized for Splunk or create a Splunk task for this.
class Log:
def __init__(self, configuration, stdout, verbose):
self.__configuration = configuration

View file

@ -0,0 +1,19 @@
"""
This file is part of Linspector (https://linspector.org/)
Copyright (c) 2023 Johannes Findeisen <you@hanez.org>. All Rights Reserved.
See LICENSE (MIT license)
"""
from linspector.core.task import Task
def create(configuration, environment, log):
return SplunkTask(configuration, environment, log)
# TODO: check for all required configuration options and set defaults if needed.
class SplunkTask(Task):
def __init__(self, configuration, environment, log):
super().__init__(configuration, environment, log)
self.__configuration = configuration
self.__environment = environment
self.__log = log