mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-05-16 13:56:11 +08:00
Some better logging for ridad.
This commit is contained in:
@@ -27,6 +27,9 @@ import rida.builder
|
|||||||
import rida.database
|
import rida.database
|
||||||
import rida.pdc
|
import rida.pdc
|
||||||
|
|
||||||
|
import logging
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def init(config, session, msg):
|
def init(config, session, msg):
|
||||||
""" Called whenever a module enters the 'init' state.
|
""" Called whenever a module enters the 'init' state.
|
||||||
|
|||||||
@@ -36,13 +36,14 @@ import os
|
|||||||
import threading
|
import threading
|
||||||
|
|
||||||
import rida.config
|
import rida.config
|
||||||
|
import rida.logging
|
||||||
import rida.messaging
|
import rida.messaging
|
||||||
import rida.scheduler.handlers.modules
|
import rida.scheduler.handlers.modules
|
||||||
#import rida.scheduler.handlers.builds
|
#import rida.scheduler.handlers.builds
|
||||||
|
|
||||||
import koji
|
import koji
|
||||||
|
|
||||||
log = logging.getLogger()
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
# TODO: Load the config file from environment
|
# TODO: Load the config file from environment
|
||||||
config = rida.config.from_file("rida.conf")
|
config = rida.config.from_file("rida.conf")
|
||||||
@@ -115,8 +116,8 @@ class Polling(threading.Thread):
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
logging.basicConfig(level=logging.DEBUG) # For now
|
rida.logging.init_logging(config)
|
||||||
logging.info("Starting ridad.")
|
log.info("Starting ridad.")
|
||||||
try:
|
try:
|
||||||
messaging_thread = Messaging()
|
messaging_thread = Messaging()
|
||||||
polling_thread = Polling()
|
polling_thread = Polling()
|
||||||
|
|||||||
Reference in New Issue
Block a user