OpenVZ Forum


Home » Mailing lists » Devel » [PATCH, try3, 0/3] Separate logfile and console loglevel
[PATCH, try3, 0/3] Separate logfile and console loglevel [message #8803] Wed, 06 December 2006 18:05 Go to next message
kfh.openvzmail is currently offline  kfh.openvzmail
Messages: 20
Registered: October 2006
Junior Member
Separate logfile and console loglevel
The separation is implemented as follows

1: split --verbose from LOG_LEVEL
verbose and LOG_LEVEL are both 0 as default
--verbose will not affect LOG_LEVEL and vice versa

2: Make --verbose accept optional value. Add VERBOSE to vz.conf
VERBOSE=0 as default
--verbose[=value]
Increase or set the logging level.
No arguments will increase the current value by one.

3: Make verbose=0 more quiet
Raise default LOG_LEVEL to 2 and VERBOSE to 1
Raise some logger(0, ...)
No logger() above 3
Defaults will print/log mostly the same...

Regards,
Kristian Høgh
Re: [PATCH, try3, 0/3] Separate logfile and console loglevel [message #8816 is a reply to message #8803] Thu, 07 December 2006 08:45 Go to previous messageGo to next message
Igor Sukhih is currently offline  Igor Sukhih
Messages: 21
Registered: May 2006
Junior Member
Kristian Høgh wrote:
> Separate logfile and console loglevel
> The separation is implemented as follows
>
> 1: split --verbose from LOG_LEVEL
> verbose and LOG_LEVEL are both 0 as default
> --verbose will not affect LOG_LEVEL and vice versa
>
Is standard command line syntax supported --verbose[=]<id> ?
> 2: Make --verbose accept optional value. Add VERBOSE to vz.conf
> VERBOSE=0 as default
> --verbose[=value]
> Increase or set the logging level.
> No arguments will increase the current value by one.
>
I don't like introducing the VERBOSE parameter. Why do you need so
complex setup
LOG_LEVEL, VERBOSE, --verbose?
If you need to limit console verbosity use --verbose <id> command line
option, by default
console_level = log_level.
> 3: Make verbose=0 more quiet
> Raise default LOG_LEVEL to 2 and VERBOSE to 1
> Raise some logger(0, ...)
> No logger() above 3
>
I don't see the reason to change default LOG_LEVEL, level > 0 usually
used for debug, all
error messages are not controlled by --verbose, LOG_LEVEL and will be
displayed any way.

So if we only introduce --verbose <id> command line option is it not
enough for you?

--
Igor.
Re: [PATCH, try3, 0/3] Separate logfile and console loglevel [message #8820 is a reply to message #8816] Thu, 07 December 2006 10:42 Go to previous messageGo to next message
kfh is currently offline  kfh
Messages: 28
Registered: October 2006
Junior Member
On Thursday den 7. December 2006 09:45, Igor Sukhih wrote:
> Kristian Høgh wrote:
> > Separate logfile and console loglevel
> > The separation is implemented as follows
> >
> > 1: split --verbose from LOG_LEVEL
> > verbose and LOG_LEVEL are both 0 as default
> > --verbose will not affect LOG_LEVEL and vice versa
>
> Is standard command line syntax supported --verbose[=]<id> ?
No. Will fix.
= is requied for <id>

> > 2: Make --verbose accept optional value. Add VERBOSE to vz.conf
> > VERBOSE=0 as default
> > --verbose[=value]
> > Increase or set the logging level.
> > No arguments will increase the current value by one.
>
> I don't like introducing the VERBOSE parameter. Why do you need so
> complex setup LOG_LEVEL, VERBOSE, --verbose?
> If you need to limit console verbosity use --verbose <id> command line
> option, by default console_level = log_level.
I would like more info in the logfile and a more quiet console.
To do that it is necessary to set LOG_LEVEL to 1 and then use --verbose=0
each time I invoke vzctl.
I think it is more complex :-)

> > 3: Make verbose=0 more quiet
> > Raise default LOG_LEVEL to 2 and VERBOSE to 1
> > Raise some logger(0, ...)
> > No logger() above 3
>
> I don't see the reason to change default LOG_LEVEL, level > 0 usually
> used for debug, all
I think level 0 is used for "debug" today.
When starting a VE using LOG_LEVEL=0, I get 10 lines of output.
I think "Running VE script: /etc/vz/dists/..." is debug.

The only(?) way I see to make level 0 more quiet is to raise "noise" [0]
to level 1 (and "Running VE script: ..." to level 2).
If LOG_LEVEL is raised to 1 the output should be the same as today level 0.
(Except "Running VE script: ...")

--quiet is to quiet.

[0] "Noise" when starting VE using level 0:
Setting CPU limit: 50
Setting CPU units: 1000
Configure meminfo: 10240
2 * "Running VE script: /etc/vz/dists/..."

> error messages are not controlled by --verbose, LOG_LEVEL and will be
> displayed any way.
> So if we only introduce --verbose <id> command line option is it not
> enough for you?
No, only if "noise" is moved to level 1.

> --
> Igor.
/Kristian.
Re: [PATCH, try3, 0/3] Separate logfile and console loglevel [message #8822 is a reply to message #8820] Thu, 07 December 2006 11:14 Go to previous messageGo to next message
kfh is currently offline  kfh
Messages: 28
Registered: October 2006
Junior Member
On Thursday den 7. December 2006 11:42, Kristian F. Høgh wrote:
> On Thursday den 7. December 2006 09:45, Igor Sukhih wrote:
> > Kristian HЬgh wrote:
> > > Separate logfile and console loglevel
> > Is standard command line syntax supported --verbose[=]<id> ?
> No. Will fix.

> > I don't see the reason to change default LOG_LEVEL, level > 0 usually
> > used for debug, all
>
> I think level 0 is used for "debug" today.

Igor, if I do:

1. --verbose[=<id>]
--verbose[ <id>]

2. Move "Setting CPU..", "Configure meminfo" and ""Running VE script:"
to level 1

Optional:
LOG_LEVEL defaults to 1?
Should verbose defaults to LOG_LEVEL or 0?

Skip:
> > I don't like introducing the VERBOSE parameter.

> > So if we only introduce --verbose <id> command line option is it not
> > enough for you?
>
> No, only if "noise" is moved to level 1.
As above.

> > --
> > Igor.
>
> /Kristian.
/Kristian.
Re: [PATCH, try3, 0/3] Separate logfile and console loglevel [message #8824 is a reply to message #8820] Thu, 07 December 2006 11:31 Go to previous messageGo to next message
Igor Sukhih is currently offline  Igor Sukhih
Messages: 21
Registered: May 2006
Junior Member
Kristian F. Høgh wrote:
> On Thursday den 7. December 2006 09:45, Igor Sukhih wrote:
>
>> Kristian Høgh wrote:
>>
>>> Separate logfile and console loglevel
>>> The separation is implemented as follows
>>>
>>> 1: split --verbose from LOG_LEVEL
>>> verbose and LOG_LEVEL are both 0 as default
>>> --verbose will not affect LOG_LEVEL and vice versa
>>>
>> Is standard command line syntax supported --verbose[=]<id> ?
>>
> No. Will fix.
> = is requied for <id>
>
>
>>> 2: Make --verbose accept optional value. Add VERBOSE to vz.conf
>>> VERBOSE=0 as default
>>> --verbose[=value]
>>> Increase or set the logging level.
>>> No arguments will increase the current value by one.
>>>
>> I don't like introducing the VERBOSE parameter. Why do you need so
>> complex setup LOG_LEVEL, VERBOSE, --verbose?
>> If you need to limit console verbosity use --verbose <id> command line
>> option, by default console_level = log_level.
>>
> I would like more info in the logfile and a more quiet console.
> To do that it is necessary to set LOG_LEVEL to 1 and then use --verbose=0
> each time I invoke vzctl.
> I think it is more complex :-)
>
In you implementation you should use this syntax anytime, because of
logging design
There are 3 logging levels
-1 - error
0 - info (default)
> 0 - debug
thus vzctl start do print all info messages on VE start due to start
stages 1) VE creation 2) VE setup
and you see so called 'noise' messages

If you will setup VERBOSE=0, LOG_LEVEL=1 then any VE setup command
(vzctl set VEID) will display nothing.
because of noise messages.

--
Igor.
Re: [PATCH, try3, 0/3] Separate logfile and console loglevel [message #8829 is a reply to message #8824] Thu, 07 December 2006 12:09 Go to previous messageGo to next message
kfh is currently offline  kfh
Messages: 28
Registered: October 2006
Junior Member
On Thursday den 7. December 2006 12:31, Igor Sukhih wrote:
> Kristian F. Høgh wrote:
> > On Thursday den 7. December 2006 09:45, Igor Sukhih wrote:
> >> Kristian Høgh wrote:
> >>> Separate logfile and console loglevel
> >>> The separation is implemented as follows
> >>>
> >>> 1: split --verbose from LOG_LEVEL
> >>> verbose and LOG_LEVEL are both 0 as default
> >>> --verbose will not affect LOG_LEVEL and vice versa
> >>
> >> Is standard command line syntax supported --verbose[=]<id> ?
> >
> > No. Will fix.
> > = is requied for <id>
> >
> >>> 2: Make --verbose accept optional value. Add VERBOSE to vz.conf
> >>> VERBOSE=0 as default
> >>> --verbose[=value]
> >>> Increase or set the logging level.
> >>> No arguments will increase the current value by one.
> >>
> >> I don't like introducing the VERBOSE parameter. Why do you need so
> >> complex setup LOG_LEVEL, VERBOSE, --verbose?
> >> If you need to limit console verbosity use --verbose <id> command line
> >> option, by default console_level = log_level.
> >
> > I would like more info in the logfile and a more quiet console.
> > To do that it is necessary to set LOG_LEVEL to 1 and then use --verbose=0
> > each time I invoke vzctl.
> > I think it is more complex :-)
>
> In you implementation you should use this syntax anytime, because of
> logging design
> There are 3 logging levels
> -1 - error
> 0 - info (default)
>
> > 0 - debug
>
> thus vzctl start do print all info messages on VE start due to start
> stages 1) VE creation 2) VE setup
> and you see so called 'noise' messages
>
> If you will setup VERBOSE=0, LOG_LEVEL=1 then any VE setup command
> (vzctl set VEID) will display nothing.
> because of noise messages.

If I type "vzctl set 1001 ...", I would asume everything went OK,
if I get no output.
That would be my choice. Default should be 1.

/Kristian.
Re: [PATCH, try3, 0/3] Separate logfile and console loglevel [message #8833 is a reply to message #8829] Thu, 07 December 2006 12:31 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Kristian F. Høgh wrote:
> If I type "vzctl set 1001 ...", I would asume everything went OK,
> if I get no output.
>
Agreed, this is true UNIX way :)
> That would be my choice. Default should be 1.
>
Re: [PATCH, try3, 0/3] Separate logfile and console loglevel [message #8835 is a reply to message #8833] Thu, 07 December 2006 12:47 Go to previous messageGo to next message
Igor Sukhih is currently offline  Igor Sukhih
Messages: 21
Registered: May 2006
Junior Member
Kir Kolyshkin wrote:
> Kristian F. Høgh wrote:
>> If I type "vzctl set 1001 ...", I would asume everything went OK,
>> if I get no output.
>>
> Agreed, this is true UNIX way :)
Lets do not display any info messages by default, go by UNIX way :)

--
Igor.
Re: [PATCH, try3, 0/3] Separate logfile and console loglevel [message #8837 is a reply to message #8835] Thu, 07 December 2006 13:21 Go to previous messageGo to next message
Mishin Dmitry is currently offline  Mishin Dmitry
Messages: 112
Registered: February 2006
Senior Member
On Thursday 07 December 2006 15:47, Igor Sukhih wrote:
> Kir Kolyshkin wrote:
> > Kristian F. Høgh wrote:
> >> If I type "vzctl set 1001 ...", I would asume everything went OK,
> >> if I get no output.
> >>
> > Agreed, this is true UNIX way :)
> Lets do not display any info messages by default, go by UNIX way :)
Probably, global poll helps? ;)

I think, the default console level is secondary question indeed.
Split of console level and log level is usefull. So, my opinion is to
leave default level AS IS, because somebody may use this output
somewhere in his scripts (it's bad, but who knows these users? ;) ).
Kristian may intro alias in his shell in order to decrease level to `no output`
value.

--
Thanks,
Dmitry.
Re: [PATCH, try3, 0/3] Separate logfile and console loglevel [message #8838 is a reply to message #8837] Thu, 07 December 2006 13:23 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Dmitry Mishin wrote:
> On Thursday 07 December 2006 15:47, Igor Sukhih wrote:
>
>> Kir Kolyshkin wrote:
>>
>>> Kristian F. Hц╦gh wrote:
>>>
>>>> If I type "vzctl set 1001 ...", I would asume everything went OK,
>>>> if I get no output.
>>>>
>>>>
>>> Agreed, this is true UNIX way :)
>>>
>> Lets do not display any info messages by default, go by UNIX way :)
>>
> Probably, global poll helps? ;)
>
> I think, the default console level is secondary question indeed.
> Split of console level and log level is usefull. So, my opinion is to
> leave default level AS IS, because somebody may use this output
> somewhere in his scripts (it's bad, but who knows these users? ;) ).
> Kristian may intro alias in his shell in order to decrease level to `no output`
> value.
I'd rather have a config option than an alias.
Re: [PATCH, try3, 0/3] Separate logfile and console loglevel [message #8847 is a reply to message #8838] Thu, 07 December 2006 15:46 Go to previous messageGo to next message
kfh.openvzmail is currently offline  kfh.openvzmail
Messages: 20
Registered: October 2006
Junior Member
On Thursday 07 December 2006 14:23, Kir Kolyshkin wrote:
> Dmitry Mishin wrote:
> > On Thursday 07 December 2006 15:47, Igor Sukhih wrote:
> >> Kir Kolyshkin wrote:
> >>> Kristian F. Høgh wrote:
> >>>> If I type "vzctl set 1001 ...", I would asume everything went OK,
> >>>> if I get no output.
> >>>
> >>> Agreed, this is true UNIX way :)
> >>
> >> Lets do not display any info messages by default, go by UNIX way :)
Thats not what the patches do.
If VERBOSE=0 a start will generate 3-5lines of code. (Down from 10)
If VERBOSE=-1 it will be quiet.
If VERBOSE=1 a start will generate the same as today
(Except "Running script...")

> > Probably, global poll helps? ;)
> >
> > I think, the default console level is secondary question indeed.
Incrementing logger(..) and LOG_LEVEL, will not touch default output.
And will give option for VERBOSE=0 or --verbose=0

> > Split of console level and log level is usefull. So, my opinion is to
> > leave default level AS IS, because somebody may use this output
> > somewhere in his scripts (it's bad, but who knows these users? ;) ).
> > Kristian may intro alias in his shell in order to decrease level to `no
> > output` value.
An option. It stille requires some logger(0, ...) -> logger(1, ...),
as I don't want "no output" but more quiet output.

> I'd rather have a config option than an alias.
Me too

/Kristian.
Re: [PATCH, try3, 0/3] Separate logfile and console loglevel [message #8848 is a reply to message #8847] Thu, 07 December 2006 16:09 Go to previous messageGo to next message
Igor Sukhih is currently offline  Igor Sukhih
Messages: 21
Registered: May 2006
Junior Member
Kristian H?gh wrote:
> On Thursday 07 December 2006 14:23, Kir Kolyshkin wrote:
>
>> Dmitry Mishin wrote:
>>
>>> On Thursday 07 December 2006 15:47, Igor Sukhih wrote:
>>>
>>>> Kir Kolyshkin wrote:
>>>>
>>>>> Kristian F. Høgh wrote:
>>>>>
>>>>>> If I type "vzctl set 1001 ...", I would asume everything went OK,
>>>>>> if I get no output.
>>>>>>
>>>>> Agreed, this is true UNIX way :)
>>>>>
>>>> Lets do not display any info messages by default, go by UNIX way :)
>>>>
> Thats not what the patches do.
> If VERBOSE=0 a start will generate 3-5lines of code. (Down from 10)
> If VERBOSE=-1 it will be quiet.
> If VERBOSE=1 a start will generate the same as today
> (Except "Running script...")
>
>
>>> Probably, global poll helps? ;)
>>>
>>> I think, the default console level is secondary question indeed.
>>>
> Incrementing logger(..) and LOG_LEVEL, will not touch default output.
> And will give option for VERBOSE=0 or --verbose=0
>
>
>>> Split of console level and log level is usefull. So, my opinion is to
>>> leave default level AS IS, because somebody may use this output
>>> somewhere in his scripts (it's bad, but who knows these users? ;) ).
>>> Kristian may intro alias in his shell in order to decrease level to `no
>>> output` value.
>>>
> An option. It stille requires some logger(0, ...) -> logger(1, ...),
> as I don't want "no output" but more quiet output.
>
Please describe NEW logger policy, how I will decide that log level
should be used for messages
to be still quiet for you?

--
Igor.
Re: [PATCH, try3, 0/3] Separate logfile and console loglevel [message #8850 is a reply to message #8848] Thu, 07 December 2006 17:43 Go to previous message
kfh.openvzmail is currently offline  kfh.openvzmail
Messages: 20
Registered: October 2006
Junior Member
On Thursday 07 December 2006 17:09, Igor Sukhih wrote:
> Kristian H?gh wrote:
> > On Thursday 07 December 2006 14:23, Kir Kolyshkin wrote:
> >> Dmitry Mishin wrote:
> >>> On Thursday 07 December 2006 15:47, Igor Sukhih wrote:
> >>>> Kir Kolyshkin wrote:
> >>>>> Kristian F. Høgh wrote:
> >>>>>> If I type "vzctl set 1001 ...", I would asume everything went OK,
> >>>>>> if I get no output.
> >>>>>
> >>>>> Agreed, this is true UNIX way :)
> >>>>
> >>>> Lets do not display any info messages by default, go by UNIX way :)
> >
> > Thats not what the patches do.
> > If VERBOSE=0 a start will generate 3-5lines of code. (Down from 10)
> > If VERBOSE=-1 it will be quiet.
> > If VERBOSE=1 a start will generate the same as today
> > (Except "Running script...")
> >
> >>> Probably, global poll helps? ;)
> >>>
> >>> I think, the default console level is secondary question indeed.
> >
> > Incrementing logger(..) and LOG_LEVEL, will not touch default output.
> > And will give option for VERBOSE=0 or --verbose=0
> >
> >>> Split of console level and log level is usefull. So, my opinion is to
> >>> leave default level AS IS, because somebody may use this output
> >>> somewhere in his scripts (it's bad, but who knows these users? ;) ).
> >>> Kristian may intro alias in his shell in order to decrease level to `no
> >>> output` value.
> >
> > An option. It stille requires some logger(0, ...) -> logger(1, ...),
> > as I don't want "no output" but more quiet output.
>
> Please describe NEW logger policy, how I will decide that log level
> should be used for messages to be still quiet for you?
I don't know. Today I see the value 10 some places...

I just think level 0 is used too much.
Split level 0 to 0 and 1 (Make default 1)
1 is fine as 2
2 is fine as 3
All above 3 -> 3

-1 Error
0. Important/overwiev/no values (mounting, setting limits, starting up ...)
1. Info (Memory/CPU values)
2. verbose (Quota values, script names, mount point name)
3. debug (Ignored parameter, open tty, set iptables mask)

> --
> Igor.
/Kristian.
Previous Topic: [PATCH 5/12] L2 network namespace: IPv4 routing
Next Topic: [PATCH try4, 1/3] split verbose from LOG_LEVEL
Goto Forum:
  


Current Time: Sun Jul 14 23:34:07 GMT 2024

Total time taken to generate the page: 0.02365 seconds