managing the size of console.log

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

managing the size of console.log

Vince Clark
There are two startup options in startofbiz.sh
# start ofbiz
$JAVA $VMARGS -jar ofbiz.jar $* >>$OFBIZ_LOG 2>>$OFBIZ_LOG&
#exec "$JAVA" $VMARGS -jar ofbiz.jar "$@"

We are using the first option, which logs everything to console.log. This appears to be redundant with ofbiz.log. console.log is not rotated, so it gets very large.
Should we use the first option and send everything to /dev/null?

Vince Clark
Global Era
The Freedom of Open Source
[hidden email]
(303) 493-6723
Reply | Threaded
Open this post in threaded view
|

Re: managing the size of console.log

BJ Freeman
just comment out the redirect to the log.
there are plenty of other logs to look at.
rem $JAVA $VMARGS -jar ofbiz.jar $* >>$OFBIZ_LOG 2>>$OFBIZ_LOG&
$JAVA $VMARGS -jar ofbiz.jar
Vince M. Clark sent the following on 12/4/2007 12:58 PM:

> There are two startup options in startofbiz.sh
> # start ofbiz
> $JAVA $VMARGS -jar ofbiz.jar $* >>$OFBIZ_LOG 2>>$OFBIZ_LOG&
> #exec "$JAVA" $VMARGS -jar ofbiz.jar "$@"
>
> We are using the first option, which logs everything to console.log. This appears to be redundant with ofbiz.log. console.log is not rotated, so it gets very large.
> Should we use the first option and send everything to /dev/null?
>
> Vince Clark
> Global Era
> The Freedom of Open Source
> [hidden email]
> (303) 493-6723
>
Reply | Threaded
Open this post in threaded view
|

Re: managing the size of console.log

Jacques Le Roux
Administrator
You may also have a look at the colored log in webtools

Jacques

De : "BJ Freeman" <[hidden email]>

> just comment out the redirect to the log.
> there are plenty of other logs to look at.
> rem $JAVA $VMARGS -jar ofbiz.jar $* >>$OFBIZ_LOG 2>>$OFBIZ_LOG&
> $JAVA $VMARGS -jar ofbiz.jar
> Vince M. Clark sent the following on 12/4/2007 12:58 PM:
> > There are two startup options in startofbiz.sh
> > # start ofbiz
> > $JAVA $VMARGS -jar ofbiz.jar $* >>$OFBIZ_LOG 2>>$OFBIZ_LOG&
> > #exec "$JAVA" $VMARGS -jar ofbiz.jar "$@"
> >
> > We are using the first option, which logs everything to console.log. This appears to be redundant with ofbiz.log. console.log is
not rotated, so it gets very large.
> > Should we use the first option and send everything to /dev/null?
> >
> > Vince Clark
> > Global Era
> > The Freedom of Open Source
> > [hidden email]
> > (303) 493-6723
> >
>

Reply | Threaded
Open this post in threaded view
|

RE: managing the size of console.log

SkipDever
In reply to this post by Vince Clark
Vince

It is my view that a production server of any sort should never redirect stdout and stderr to a log file because you have no control over it.  If you want stdout and stderr, it's fairly simple in java to catch it and write it to a rotating log file.  In Ofbiz's case, not everything that goes to stdout and stderr is written to ofbiz.log, but everything of importance is (in my limited experience).  console.log is only useful in my view during developement.

Skip

-----Original Message-----
From: Vince M. Clark [mailto:[hidden email]]
Sent: Tuesday, December 04, 2007 12:58 PM
To: user
Subject: managing the size of console.log


There are two startup options in startofbiz.sh
# start ofbiz
$JAVA $VMARGS -jar ofbiz.jar $* >>$OFBIZ_LOG 2>>$OFBIZ_LOG&
#exec "$JAVA" $VMARGS -jar ofbiz.jar "$@"

We are using the first option, which logs everything to console.log. This appears to be redundant with ofbiz.log. console.log is not rotated, so it gets very large.
Should we use the first option and send everything to /dev/null?

Vince Clark
Global Era
The Freedom of Open Source
[hidden email]
(303) 493-6723

Reply | Threaded
Open this post in threaded view
|

Re: managing the size of console.log

jonwimp
Skip,

Agreed. I usually redirect console.log to dev null (discard).

Log4J in OFBiz does capture output in rotated logs, so the console.log is just extra. Moreover,
debug messages shouldn't be done with System.out.println.

Jonathon

skip@thedevers wrote:

> Vince
>
> It is my view that a production server of any sort should never redirect stdout and stderr to a log file because you have no control over it.  If you want stdout and stderr, it's fairly simple in java to catch it and write it to a rotating log file.  In Ofbiz's case, not everything that goes to stdout and stderr is written to ofbiz.log, but everything of importance is (in my limited experience).  console.log is only useful in my view during developement.
>
> Skip
>
> -----Original Message-----
> From: Vince M. Clark [mailto:[hidden email]]
> Sent: Tuesday, December 04, 2007 12:58 PM
> To: user
> Subject: managing the size of console.log
>
>
> There are two startup options in startofbiz.sh
> # start ofbiz
> $JAVA $VMARGS -jar ofbiz.jar $* >>$OFBIZ_LOG 2>>$OFBIZ_LOG&
> #exec "$JAVA" $VMARGS -jar ofbiz.jar "$@"
>
> We are using the first option, which logs everything to console.log. This appears to be redundant with ofbiz.log. console.log is not rotated, so it gets very large.
> Should we use the first option and send everything to /dev/null?
>
> Vince Clark
> Global Era
> The Freedom of Open Source
> [hidden email]
> (303) 493-6723
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: managing the size of console.log

Vince Clark
OK. I changed this line:
$JAVA $VMARGS -jar ofbiz.jar $* >>$OFBIZ_LOG 2>>$OFBIZ_LOG&
to
$JAVA $VMARGS -jar ofbiz.jar $* >>/dev/null 2>>/dev/null&

Not sure why OFBIZ_LOG is listed twice, but I'm no shell script guru.

----- Original Message -----
From: "Jonathon -- Improov" <[hidden email]>
To: [hidden email]
Sent: Tuesday, December 4, 2007 10:22:14 PM (GMT-0700) America/Denver
Subject: Re: managing the size of console.log

Skip,

Agreed. I usually redirect console.log to dev null (discard).

Log4J in OFBiz does capture output in rotated logs, so the console.log is just extra. Moreover,
debug messages shouldn't be done with System.out.println.

Jonathon

skip@thedevers wrote:

> Vince
>
> It is my view that a production server of any sort should never redirect stdout and stderr to a log file because you have no control over it. If you want stdout and stderr, it's fairly simple in java to catch it and write it to a rotating log file. In Ofbiz's case, not everything that goes to stdout and stderr is written to ofbiz.log, but everything of importance is (in my limited experience). console.log is only useful in my view during developement.
>
> Skip
>
> -----Original Message-----
> From: Vince M. Clark [mailto:[hidden email]]
> Sent: Tuesday, December 04, 2007 12:58 PM
> To: user
> Subject: managing the size of console.log
>
>
> There are two startup options in startofbiz.sh
> # start ofbiz
> $JAVA $VMARGS -jar ofbiz.jar $* >>$OFBIZ_LOG 2>>$OFBIZ_LOG&
> #exec "$JAVA" $VMARGS -jar ofbiz.jar "$@"
>
> We are using the first option, which logs everything to console.log. This appears to be redundant with ofbiz.log. console.log is not rotated, so it gets very large.
> Should we use the first option and send everything to /dev/null?
>
> Vince Clark
> Global Era
> The Freedom of Open Source
> [hidden email]
> (303) 493-6723
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: managing the size of console.log

jonwimp
$JAVA $VMARGS -jar ofbiz.jar $* > /dev/null 2>&1 &

">>" means to append. ">" means to "write anew".

Or, in short:

$JAVA $VMARGS -jar ofbiz.jar $* &> /dev/null &

Listed twice because there are 2 pipes: standard output and error output. Both need to be sunk
into /dev/null .

The last "&" tells OFBiz to run in the background, so you can log out of your shell and disconnect
from the server without causing OFBiz to stop as well.

Hope the above is right. Tired now late at night.

Jonathon

Vince M. Clark wrote:

> OK. I changed this line:
> $JAVA $VMARGS -jar ofbiz.jar $* >>$OFBIZ_LOG 2>>$OFBIZ_LOG&
> to
> $JAVA $VMARGS -jar ofbiz.jar $* >>/dev/null 2>>/dev/null&
>
> Not sure why OFBIZ_LOG is listed twice, but I'm no shell script guru.
>
> ----- Original Message -----
> From: "Jonathon -- Improov" <[hidden email]>
> To: [hidden email]
> Sent: Tuesday, December 4, 2007 10:22:14 PM (GMT-0700) America/Denver
> Subject: Re: managing the size of console.log
>
> Skip,
>
> Agreed. I usually redirect console.log to dev null (discard).
>
> Log4J in OFBiz does capture output in rotated logs, so the console.log is just extra. Moreover,
> debug messages shouldn't be done with System.out.println.
>
> Jonathon
>
> skip@thedevers wrote:
>> Vince
>>
>> It is my view that a production server of any sort should never redirect stdout and stderr to a log file because you have no control over it. If you want stdout and stderr, it's fairly simple in java to catch it and write it to a rotating log file. In Ofbiz's case, not everything that goes to stdout and stderr is written to ofbiz.log, but everything of importance is (in my limited experience). console.log is only useful in my view during developement.
>>
>> Skip
>>
>> -----Original Message-----
>> From: Vince M. Clark [mailto:[hidden email]]
>> Sent: Tuesday, December 04, 2007 12:58 PM
>> To: user
>> Subject: managing the size of console.log
>>
>>
>> There are two startup options in startofbiz.sh
>> # start ofbiz
>> $JAVA $VMARGS -jar ofbiz.jar $* >>$OFBIZ_LOG 2>>$OFBIZ_LOG&
>> #exec "$JAVA" $VMARGS -jar ofbiz.jar "$@"
>>
>> We are using the first option, which logs everything to console.log. This appears to be redundant with ofbiz.log. console.log is not rotated, so it gets very large.
>> Should we use the first option and send everything to /dev/null?
>>
>> Vince Clark
>> Global Era
>> The Freedom of Open Source
>> [hidden email]
>> (303) 493-6723
>>
>>
>>
>
>
>
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.503 / Virus Database: 269.16.14/1171 - Release Date: 12/4/2007 7:31 PM