Managing console.log

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

Managing console.log

Vinay Agarwal
Hello,

I just saw my console.log to be 11GB size. Is there a way to drop old log
data and keep this log to a more manageable size like 100MB or less without
having to restart OFBiz? Thanks in advance.

Regards,

Vinay Agarwal

Reply | Threaded
Open this post in threaded view
|

Re: Managing console.log

BJ Freeman
you can remove the redirect from the script.
then use the other logs and html to view the activity
there is no way to manage it since it is a >> at the command line.

Vinay Agarwal sent the following on 10/16/2007 9:45 AM:

> Hello,
>
> I just saw my console.log to be 11GB size. Is there a way to drop old log
> data and keep this log to a more manageable size like 100MB or less without
> having to restart OFBiz? Thanks in advance.
>
> Regards,
>
> Vinay Agarwal
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Managing console.log

Carl Gleisner
Would logrotate help?

Logrotate at linuxcommand

BJ Freeman wrote
you can remove the redirect from the script.
then use the other logs and html to view the activity
there is no way to manage it since it is a >> at the command line.

Vinay Agarwal sent the following on 10/16/2007 9:45 AM:
> Hello,
>
> I just saw my console.log to be 11GB size. Is there a way to drop old log
> data and keep this log to a more manageable size like 100MB or less without
> having to restart OFBiz? Thanks in advance.
>
> Regards,
>
> Vinay Agarwal
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Managing console.log

Gautam Deb-2
As BJ already pointed out, you can remove the redirection to
console.logfile from the startofbiz
script (bat or sh) and can use the ofbiz.log files for viewing activities,
which are located at {ofbiz.home}/framework/logs directory. These are
basically output from log4j api which ofbiz uses internally for logging.

You can create your custom appender for log4j for a desired output format
and file rotation policy. You can find more information on fine tuning at
http://logging.apache.org/log4j/1.2/index.html

The only possible DRAW-BACK......You can no more use SOPs in your java
code!!!

Hope this helps.

Best Regards,
Gautam Deb



On 10/23/07, Carl Johansson <[hidden email]> wrote:

>
>
> Would logrotate help?
>
> http://www.linuxcommand.org/man_pages/logrotate8.html Logrotate at
> linuxcommand
>
>
> BJ Freeman wrote:
> >
> > you can remove the redirect from the script.
> > then use the other logs and html to view the activity
> > there is no way to manage it since it is a >> at the command line.
> >
> > Vinay Agarwal sent the following on 10/16/2007 9:45 AM:
> >> Hello,
> >>
> >> I just saw my console.log to be 11GB size. Is there a way to drop old
> log
> >> data and keep this log to a more manageable size like 100MB or less
> >> without
> >> having to restart OFBiz? Thanks in advance.
> >>
> >> Regards,
> >>
> >> Vinay Agarwal
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Managing-console.log-tf4635394.html#a13358487
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>


--
<br><a href="http://www.myspaceantics.com/images-glitter-comments-63.html"
target="_blank" title="MySpace Graphics, Icons, Animations"><img src="
http://www.myspaceantics.com/images/glitter-comments/text_miscellaneous_657.gif"
border="0" alt="More Pics @ MySpaceAntics.com"></a><br><a href="
http://www.myspaceantics.com">MySpace Graphics</a> - <a href="
http://www.profiledough.com/register.php?uid=antics">MySPACE MONEY</a><br>
Reply | Threaded
Open this post in threaded view
|

Re: Managing console.log

BJ Freeman
depend on revision
{ofbiz.home}/framework/logs
is the old location
current SVN is
{ofbiz.home}/runtime/logs

Gautam Deb sent the following on 10/23/2007 11:17 AM:

> As BJ already pointed out, you can remove the redirection to
> console.logfile from the startofbiz
> script (bat or sh) and can use the ofbiz.log files for viewing activities,
> which are located at {ofbiz.home}/framework/logs directory. These are
> basically output from log4j api which ofbiz uses internally for logging.
>
> You can create your custom appender for log4j for a desired output format
> and file rotation policy. You can find more information on fine tuning at
> http://logging.apache.org/log4j/1.2/index.html
>
> The only possible DRAW-BACK......You can no more use SOPs in your java
> code!!!
>
> Hope this helps.
>
> Best Regards,
> Gautam Deb
>
>
>
> On 10/23/07, Carl Johansson <[hidden email]> wrote:
>>
>> Would logrotate help?
>>
>> http://www.linuxcommand.org/man_pages/logrotate8.html Logrotate at
>> linuxcommand
>>
>>
>> BJ Freeman wrote:
>>> you can remove the redirect from the script.
>>> then use the other logs and html to view the activity
>>> there is no way to manage it since it is a >> at the command line.
>>>
>>> Vinay Agarwal sent the following on 10/16/2007 9:45 AM:
>>>> Hello,
>>>>
>>>> I just saw my console.log to be 11GB size. Is there a way to drop old
>> log
>>>> data and keep this log to a more manageable size like 100MB or less
>>>> without
>>>> having to restart OFBiz? Thanks in advance.
>>>>
>>>> Regards,
>>>>
>>>> Vinay Agarwal
>>>>
>>>>
>>>
>> --
>> View this message in context:
>> http://www.nabble.com/Managing-console.log-tf4635394.html#a13358487
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Managing console.log

rajsaini
In reply to this post by Gautam Deb-2
If you are running the script in the background on Linux, you may like
to redirect the stdout and stderr to /dev/null. This way you can keep
the ofbiz running even after closing the terminal window.

Thanks,

Raj

Gautam Deb wrote:

> As BJ already pointed out, you can remove the redirection to
> console.logfile from the startofbiz
> script (bat or sh) and can use the ofbiz.log files for viewing activities,
> which are located at {ofbiz.home}/framework/logs directory. These are
> basically output from log4j api which ofbiz uses internally for logging.
>
> You can create your custom appender for log4j for a desired output format
> and file rotation policy. You can find more information on fine tuning at
> http://logging.apache.org/log4j/1.2/index.html
>
> The only possible DRAW-BACK......You can no more use SOPs in your java
> code!!!
>
> Hope this helps.
>
> Best Regards,
> Gautam Deb
>
>
>
> On 10/23/07, Carl Johansson <[hidden email]> wrote:
>  
>> Would logrotate help?
>>
>> http://www.linuxcommand.org/man_pages/logrotate8.html Logrotate at
>> linuxcommand
>>
>>
>> BJ Freeman wrote:
>>    
>>> you can remove the redirect from the script.
>>> then use the other logs and html to view the activity
>>> there is no way to manage it since it is a >> at the command line.
>>>
>>> Vinay Agarwal sent the following on 10/16/2007 9:45 AM:
>>>      
>>>> Hello,
>>>>
>>>> I just saw my console.log to be 11GB size. Is there a way to drop old
>>>>        
>> log
>>    
>>>> data and keep this log to a more manageable size like 100MB or less
>>>> without
>>>> having to restart OFBiz? Thanks in advance.
>>>>
>>>> Regards,
>>>>
>>>> Vinay Agarwal
>>>>
>>>>
>>>>        
>>>      
>> --
>> View this message in context:
>> http://www.nabble.com/Managing-console.log-tf4635394.html#a13358487
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>>
>>    
>
>
>