#507 drop unused add_db_logger call and db table
Merged 4 years ago by mikem. Opened 4 years ago by tkopecek.
tkopecek/koji issue469  into  master

file modified
-1
@@ -17,7 +17,6 @@ 

  DROP TABLE IF EXISTS win_builds;

  DROP TABLE IF EXISTS maven_builds;

  DROP TABLE IF EXISTS build_notifications;

- DROP TABLE IF EXISTS log_messages;

  DROP TABLE IF EXISTS buildroot_listing;

  DROP TABLE IF EXISTS rpmsigs;

  DROP TABLE IF EXISTS rpminfo;

@@ -0,0 +1,9 @@ 

+ -- upgrade script to migrate the Koji database schema

+ -- from version 1.13 to 1.14

+ 

+ BEGIN;

+ 

+ -- drop unused log_messages table

+ DROP TABLE log_messages;

+ 

+ COMMIT;

file modified
-10
@@ -685,16 +685,6 @@ 

  ) WITHOUT OIDS;

  CREATE INDEX buildroot_listing_rpms ON buildroot_listing(rpm_id);

  

- CREATE TABLE log_messages (

-     id SERIAL NOT NULL PRIMARY KEY,

-     message TEXT NOT NULL,

-     message_time TIMESTAMP NOT NULL DEFAULT NOW(),

-     logger_name VARCHAR(200) NOT NULL,

-     level VARCHAR(10) NOT NULL,

-     location VARCHAR(200),

-     host VARCHAR(200)

- ) WITHOUT OIDS;

- 

  CREATE TABLE build_notifications (

      id SERIAL NOT NULL PRIMARY KEY,

      user_id INTEGER NOT NULL REFERENCES users (id),

file modified
-12
@@ -3025,17 +3025,5 @@ 

      handler.setLevel(logging.ERROR)

      logging.getLogger(logger).addHandler(handler)

  

- def add_db_logger(logger, cnx):

-     handler = DBHandler(cnx, "log_messages", {'message': '%(message)s',

-                                               'message_time': '%(asctime)s',

-                                               'logger_name': '%(name)s',

-                                               'level': '%(levelname)s',

-                                               'location': '%(pathname)s:%(lineno)d',

-                                               'host': socket.getfqdn(),

-                                               })

-     handler.setFormatter(logging.Formatter(datefmt='%Y-%m-%d %H:%M:%S'))

-     logging.getLogger(logger).addHandler(handler)

-     return handler

- 

  def remove_log_handler(logger, handler):

      logging.getLogger(logger).removeHandler(handler)