[sheepdog] [PATCH v2 1/2] sheep, dog: runtime loglevel changing
Liu Yuan
namei.unix at gmail.com
Tue Oct 22 09:29:03 CEST 2013
On Tue, Oct 22, 2013 at 04:17:58PM +0900, Hitoshi Mitake wrote:
> At Tue, 22 Oct 2013 14:11:01 +0800,
> Liu Yuan wrote:
> >
> > On Sat, Oct 19, 2013 at 11:35:33PM +0900, Hitoshi Mitake wrote:
> > > This patch adds two new opcode for runtime loglevel changes and let
> > > dog support the changing from command line. This is useful for making
> > > sheep process verbose temporally and can make troubleshooting easier.
> > >
> > > Example of usage:
> > >
> > > $ dog node loglevel list
> > > emerg (0)
> > > alert (1)
> > > crit (2)
> > > err (3)
> > > warning (4)
> > > notice (5)
> > > info (6)
> > > debug (7)
> > > $ dog node loglevel get
> > > info (6)
> > > $ dog node loglevel set debug # <- change loglevel from info to debug
> > > $ dog node loglevel get
> > > debug (7)
> >
> > I am still not convinced of 'loglevel'. It would hard to extend, e.g, if we
> > want to add more commands related to 'log', like 'log filter', we have no
> > choice but to add 'dog node logfilter'.
> >
> > So I think 'dog node log' would be a good log namespace for its subcommands.
> > That said,
> > 'node log set' # implies to set log level
> > 'node log get' # implies to get log level
> > 'node log list' # implies to list log level
> > 'node log filter' # operate on the content of log
> > looks okay to me.
> >
>
> How about "node log level {set,get,list}"? Users wouldn't be able to read the
> intention of manipulating levels from "node log set".
Looks good to me
Thanks
Yuan
More information about the sheepdog
mailing list