Mailing List Archive

Re: Consideration of removing dblogging
Reviewing a stash on a machine that I was looking to
retire I noticed an idea I had sort of toyed with many
years ago (in the 0.28 time frame) to remove db logging.

Per the explicit development guidelines about asking
permission in advance for any PR that is changing
codes in more than a trivial way, I am considering a
PR that will remove db logging.

Is there interest in reviewing such a PR should I
submit it?

My stash itself predates a number of other changes
such as mostly (but not entirely) removing of the
logserver, so I would need to do some rework, so
it is not likely to happen any time soon, but I figured
I would ask if I should just drop the stash and move
on or add it back to the TODO list.

Background:

I consider db logging to be an interesting idea for
a time that no longer is, and no-dblog has been the
default for quite some time now in the code base.
I would be surprised if anyone is still trying to use it.

Issues/Reasoning for removal:

- no-dblog has been the default for some time.
- logging to the database requires a database connection,
and the long term goal of either an embedded database,
or a "services" frontend suggests logging to the database
is a bad long term plan.
- logging to the database exacerbates database overhead,
meaning that logging to find database issues results in
more database issues.
- there is some hoop jumping in the various code(s)
to deal with db logging (and cleanup is good).
- there is no services API to log to a central location
(if someone thinks dblogging is a good idea)
- simplification by dropping support for something that
is believed to not be being used.
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Consideration of removing dblogging [ In reply to ]
Hi Gary,

I have never used blogging and I do not think it is a good idea anyway.
If you create a PR to remove it I will look into it.

Klaas.


On Mon, 20 Mar 2023 at 20:25, Gary Buhrmaster <gary.buhrmaster@gmail.com>
wrote:

> Reviewing a stash on a machine that I was looking to
> retire I noticed an idea I had sort of toyed with many
> years ago (in the 0.28 time frame) to remove db logging.
>
> Per the explicit development guidelines about asking
> permission in advance for any PR that is changing
> codes in more than a trivial way, I am considering a
> PR that will remove db logging.
>
> Is there interest in reviewing such a PR should I
> submit it?
>
> My stash itself predates a number of other changes
> such as mostly (but not entirely) removing of the
> logserver, so I would need to do some rework, so
> it is not likely to happen any time soon, but I figured
> I would ask if I should just drop the stash and move
> on or add it back to the TODO list.
>
> Background:
>
> I consider db logging to be an interesting idea for
> a time that no longer is, and no-dblog has been the
> default for quite some time now in the code base.
> I would be surprised if anyone is still trying to use it.
>
> Issues/Reasoning for removal:
>
> - no-dblog has been the default for some time.
> - logging to the database requires a database connection,
> and the long term goal of either an embedded database,
> or a "services" frontend suggests logging to the database
> is a bad long term plan.
> - logging to the database exacerbates database overhead,
> meaning that logging to find database issues results in
> more database issues.
> - there is some hoop jumping in the various code(s)
> to deal with db logging (and cleanup is good).
> - there is no services API to log to a central location
> (if someone thinks dblogging is a good idea)
> - simplification by dropping support for something that
> is believed to not be being used.
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
Re: Consideration of removing dblogging [ In reply to ]
Is this about sending MythTV logs to the database and not about
logging about database operations in MythTV? If so, I have no issues
with removing it either.

David

On Tue, Mar 21, 2023 at 10:35:59PM +0100, Klaas de Waal wrote:
> Hi Gary,
>
> I have never used blogging and I do not think it is a good idea anyway.
> If you create a PR to remove it I will look into it.
>
> Klaas.
>
>
> On Mon, 20 Mar 2023 at 20:25, Gary Buhrmaster <gary.buhrmaster@gmail.com>
> wrote:
>
> > Reviewing a stash on a machine that I was looking to
> > retire I noticed an idea I had sort of toyed with many
> > years ago (in the 0.28 time frame) to remove db logging.
> >
> > Per the explicit development guidelines about asking
> > permission in advance for any PR that is changing
> > codes in more than a trivial way, I am considering a
> > PR that will remove db logging.
> >
> > Is there interest in reviewing such a PR should I
> > submit it?
> >
> > My stash itself predates a number of other changes
> > such as mostly (but not entirely) removing of the
> > logserver, so I would need to do some rework, so
> > it is not likely to happen any time soon, but I figured
> > I would ask if I should just drop the stash and move
> > on or add it back to the TODO list.
> >
> > Background:
> >
> > I consider db logging to be an interesting idea for
> > a time that no longer is, and no-dblog has been the
> > default for quite some time now in the code base.
> > I would be surprised if anyone is still trying to use it.
> >
> > Issues/Reasoning for removal:
> >
> > - no-dblog has been the default for some time.
> > - logging to the database requires a database connection,
> > and the long term goal of either an embedded database,
> > or a "services" frontend suggests logging to the database
> > is a bad long term plan.
> > - logging to the database exacerbates database overhead,
> > meaning that logging to find database issues results in
> > more database issues.
> > - there is some hoop jumping in the various code(s)
> > to deal with db logging (and cleanup is good).
> > - there is no services API to log to a central location
> > (if someone thinks dblogging is a good idea)
> > - simplification by dropping support for something that
> > is believed to not be being used.
> > _______________________________________________
> > mythtv-dev mailing list
> > mythtv-dev@mythtv.org
> > http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> > http://wiki.mythtv.org/Mailing_List_etiquette
> > MythTV Forums: https://forum.mythtv.org
> >

> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org


--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Consideration of removing dblogging [ In reply to ]
On Wed, Mar 22, 2023 at 12:24?AM David Engel <david@istwok.net> wrote:
>
> Is this about sending MythTV logs to the database and not about
> logging about database operations in MythTV? If so, I have no issues
> with removing it either.
>

This is about logging *to* the database (the
"logging" table) It could allow MythTV to
provide a centralized logging service, or
supplementing (or replacing) syslog, file, or
journald logging, and (as I recall) mythweb
could even display it if so configured.

It has been set to disabled (by default)
for a long time.

Interesting, logging of database operations
has special code to not log the database
operation if the operation is about writing
to the logging table.
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Consideration of removing dblogging [ In reply to ]
On Wed, Mar 22, 2023 at 01:00:12AM +0000, Gary Buhrmaster wrote:
> On Wed, Mar 22, 2023 at 12:24?AM David Engel <david@istwok.net> wrote:
> >
> > Is this about sending MythTV logs to the database and not about
> > logging about database operations in MythTV? If so, I have no issues
> > with removing it either.
>
> This is about logging *to* the database (the
> "logging" table) It could allow MythTV to
> provide a centralized logging service, or
> supplementing (or replacing) syslog, file, or
> journald logging, and (as I recall) mythweb
> could even display it if so configured.
>
> It has been set to disabled (by default)
> for a long time.

Thanks. Proceed with your PR. I see no reason to carry around a
reinvented wheel that isn't even being used. There are better
alternatives available for those that really want searchable logs.

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Consideration of removing dblogging [ In reply to ]
On Wed, 2023-03-22 at 10:42 -0500, David Engel wrote:
> On Wed, Mar 22, 2023 at 01:00:12AM +0000, Gary Buhrmaster wrote:
> > On Wed, Mar 22, 2023 at 12:24?AM David Engel <david@istwok.net>
> > wrote:
> > >
> > > Is this about sending MythTV logs to the database and not about
> > > logging about database operations in MythTV?  If so, I have no
> > > issues
> > > with removing it either.
> >
> > This is about logging *to* the database (the
> > "logging" table)  It could allow MythTV to
> > provide a centralized logging service, or
> > supplementing (or replacing) syslog, file, or
> > journald logging, and (as I recall) mythweb
> > could even display it if so configured.
> >
> > It has been set to disabled (by default)
> > for a long time.
>
> Thanks.  Proceed with your PR.  I see no reason to carry around a
> reinvented wheel that isn't even being used.  There are better
> alternatives available for those that really want searchable logs.

I'll take care of this.  There's a lot of cruft in there that could
have been removed four years ago when the mythlogserver program was
removed.

I just spent time removing the old qjsonwrapper external qt4->qt5 json
bridge code. Since that code was used as the connection from
logging.cpp to loggingserver.cpp, that got me looking at all the
unnecessary code in loggingserver.cpp. (I.E. There's no need to
convert an object to json and back if all the code executes in the same
process, and there's no need for client->logger and logger->client maps
if there's only ever one client.) I punted on cleaning up that code
four years ago, so now seems like a good time for me to finish the
removal of the mythlogserver program.

David


_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Consideration of removing dblogging [ In reply to ]
On Sat, Apr 1, 2023 at 2:37?PM David Hampton via mythtv-dev
<mythtv-dev@mythtv.org> wrote:

> I'll take care of this.

Thanks.

The less cleanup work I have offered to
do the better to reduce my timelines for
my future migrations.

If you want any of the various incomplete
stashes that I started I can send them to
you (they included some python bindings,
command line deprecations, and various
code changes). While they are not correct
as is, they might provide some hints.
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Consideration of removing dblogging [ In reply to ]
On Saturday 01 April 2023 09:36:58 AM (-05:00), David Hampton via mythtv-dev wrote:

> On Wed, 2023-03-22 at 10:42 -0500, David Engel wrote:
> > On Wed, Mar 22, 2023 at 01:00:12AM +0000, Gary Buhrmaster wrote:
> > > On Wed, Mar 22, 2023 at 12:24?AM David Engel
> > > wrote:
> > > >
> > > > Is this about sending MythTV logs to the database and not about
> > > > logging about database operations in MythTV? If so, I have no
> > > > issues
> > > > with removing it either.
> > >
> > > This is about logging *to* the database (the
> > > "logging" table) It could allow MythTV to
> > > provide a centralized logging service, or
> > > supplementing (or replacing) syslog, file, or
> > > journald logging, and (as I recall) mythweb
> > > could even display it if so configured.
> > >
> > > It has been set to disabled (by default)
> > > for a long time.
> >
> > Thanks. Proceed with your PR. I see no reason to carry around a
> > reinvented wheel that isn't even being used. There are better
> > alternatives available for those that really want searchable logs.
>
> I'll take care of this. There's a lot of cruft in there that could
> have been removed four years ago when the mythlogserver program was
> removed.
>
> I just spent time removing the old qjsonwrapper external qt4->qt5 json
> bridge code. Since that code was used as the connection from
> logging.cpp to loggingserver.cpp, that got me looking at all the
> unnecessary code in loggingserver.cpp. (I.E. There's no need to
> convert an object to json and back if all the code executes in the same
> process, and there's no need for client->logger and logger->client maps
> if there's only ever one client.) I punted on cleaning up that code
> four years ago, so now seems like a good time for me to finish the
> removal of the mythlogserver program.
>
> David

I created the v34 release notes page and mentioned this (as in progress).
https://www.mythtv.org/wiki/Release_Notes_-_34#Special_Notices_.26_Instructions

--
Bill
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Consideration of removing dblogging [ In reply to ]
On Sat, Apr 1, 2023 at 4:52?PM Gary Buhrmaster <gary.buhrmaster@gmail.com>
wrote:

>
> If you want any of the various incomplete
> stashes that I started I can send them to
> you (they included some python bindings,
> command line deprecations, and various
> code changes). While they are not correct
> as is, they might provide some hints.
>
>
Gary,
yes I am interested to get your work on this.

The db-logging was the only reason that hindered me
to use the Python's internal module `logging`, see
https://docs.python.org/3/library/logging.html
instead of the MythTV's own implementation at
https://github.com/MythTV/mythtv/blob/master/mythtv/bindings/python/MythTV/logging.py

Your work already done could help me to check
completeness.

Roland