Opened 11 years ago

Closed 9 years ago

Last modified 9 years ago

#11992 closed Patch - Bug Fix (fixed)

Patch: Prevent an invalid combination of logging options and adjust the --help output

Reported by: Bill Meek <keemllib@…> Owned by: Bill Meek
Priority: minor Milestone: 0.28
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

According to mythAnyCommand --help nologserver (changeset:f124159):

Description: Disable all logging but console.

However, the three options in the above Summary are allowed. If used, then mythlogserver is started, however nothing is sent to the logs or the database (only the console, as expected.)

This patch will prevent the invalid combination and cause the following to be added to --help nologserver output:

Prevents the use of:
 --logpath --syslog --enable-dblog

Attachments (1)

nologserver.patch.0 (677 bytes) - added by Bill Meek <keemllib@…> 11 years ago.
Patch tested on: v0.28-pre-655-g7f3d8f7

Download all attachments as: .zip

Change History (15)

Changed 11 years ago by Bill Meek <keemllib@…>

Attachment: nologserver.patch.0 added

Patch tested on: v0.28-pre-655-g7f3d8f7

comment:1 Changed 10 years ago by Bill Meek <keemllib@…>

Owner: set to Bill Meek <keemllib@…>
Resolution: fixed
Status: newclosed

In be72636b9e34b1b9fb032a1da578a742d562d0b9/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:2 Changed 10 years ago by Bill Meek <keemllib@…>

In ec06dfba8e22008ac97af81f997e9b521eca62ae/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:3 Changed 10 years ago by paulh

Milestone: unknown0.27.5

comment:4 Changed 10 years ago by JYA

Resolution: fixed
Status: closednew

this ticket and description is wrong.

--nologserver prevent that a mythlogserver daemon is forked and run in the background.

Instead, logs are processed within a separate thread which log all the logs.

running a myth application with --nologserver is identical to compiling mythtv with --disable-mythlogserver

except of course , should people want to, they can still run mythlogserver daemon

comment:5 Changed 10 years ago by JYA

IMHO, the bug is in the description of what --nologserver is supposed to do.

comment:6 Changed 10 years ago by Paul Harrison <pharrison@…>

In 9a72d02cb7e9a89135b5044e9179f148a45b0cf6/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:7 Changed 10 years ago by Bill Meek <keemllib@…>

If memory serves, the reason I wrote the ticket was that someone on -users (list or channel) was using --nologserver and wasn't getting one of the other forms of logging. [Which they shouldn't expect because logging only goes to the console.]

I haven't seen any reports of users not getting logs since then. I would suggest the fix is valid based on the commit cited on the 1st line of the initial description (changeset:f124159.)

comment:8 Changed 10 years ago by Stuart Auchterlonie

Milestone: 0.27.50.27.6

comment:9 Changed 10 years ago by Bill Meek <keemllib@…>

For additional history regarding the initial revert, please see the logs at 13:11:44 here:

irc.mythtv.org/ircLog/channel/4/2014-11-19

comment:10 Changed 9 years ago by Karl Egly

Owner: changed from Bill Meek <keemllib@…> to JYA
Status: newassigned

Convenience link to the chat log: http://irc.mythtv.org/ircLog/channel/4/2014-11-19:12:49:52/2014-11-19:13:13:44

Jya, can you clarify the intention of --nologserver? Your comment when reopening and your documentation of the option in the source code say different things. I'm tempted to let the documentation describe the implementation as it is now. Although I'm not sure how the implementation is now :)

https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mythcommandlineparser.cpp#L2436

add("--nologserver", "nologserver", false, "Disable all logging but console.", "")
            ->SetGroup("Logging");

comment:11 Changed 9 years ago by Bill Meek <keemllib@…>

Suggest a 0.28 milestone because implementing it now could prevent 0.27 user's backends from starting (if they have incorrect flags.)

I'll add it to the 0.28 release notes if fixed.

comment:12 in reply to:  10 Changed 9 years ago by JYA

Replying to dekarl:

Convenience link to the chat log: http://irc.mythtv.org/ircLog/channel/4/2014-11-19:12:49:52/2014-11-19:13:13:44

Jya, can you clarify the intention of --nologserver? Your comment when reopening and your documentation of the option in the source code say different things. I'm tempted to let the documentation describe the implementation as it is now. Although I'm not sure how the implementation is now :)

did I add that option?

maybe easiest would be to rename that argument, because right now it's super confusing.

comment:13 Changed 9 years ago by Bill Meek <bmeek@…>

Resolution: fixed
Status: assignedclosed

In ac415356601a0122b2c0c6cd6df0f265a8afe744/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:14 Changed 9 years ago by Bill Meek

Milestone: 0.27.60.28
Owner: changed from JYA to Bill Meek
Summary: Patch: Prevent --syslog, --logpath and --enable-dblog if --nologserver is usedPatch: Prevent an invalid combination of logging options and adjust the --help output
Note: See TracTickets for help on using tickets.