On Wed, Nov 02, 2016 at 12:47:14PM +0100, Richard Cochran wrote:
> On Mon, Oct 17, 2016 at 04:33:30PM +0200, Miroslav Lichvar wrote:
> > @@ -67,13 +73,17 @@ void print(int level, char const *format, ...)
> >
> > if (verbose) {
> > f = level >= LOG_NOTICE ? stdout : stderr;
> > - fprintf(f, "%s[%ld.%03ld]: %s\n",
> > + fprintf(f, "%s[%ld.%03ld]: %s%s%s\n",
>
> The string comes after the time stamp and after the program name. So
> it really isn't a prefix at all. Maybe this should be called "tag"
> instead?
Ok, so the option should be called print-tag, log-tag, message-tag, or
something else?
> > @@ -62,6 +62,7 @@ static void usage(char *progname)
> > " (ignored for SOFTWARE/LEGACY HW time stamping)\n"
> > " -s slave only mode (overrides configuration file)\n"
> > " -l [num] set the logging level to 'num'\n"
> > + " -o [str] set prefix for log messages\n"
>
> Do we really have to have a new command line option?
>
> I don't want another one of these, especially not for ptp4l, and not
> even for phc2sys or pmc. It just gets unwieldy and confusing.
> Instead we should add '-f config' for phc2sys and pmc.
I wouldn't mind if phc2sys and pmc supported config files, but I think
this particular option might be one of those that make more sense to
be used on command line rather than config file. If I wanted to run
multiple ptp4l instances with different tags for their log messages,
I could still share the config file between them if I specified the
interface and tag on the command line.
Would it be less confusing if we introduced GNU-style long option
names?
--
Miroslav Lichvar
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel