Server.log max size

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

Server.log max size

OpenESB Community Forum mailing list
Hi,

I have Open ESB v3.1 installed as an standalone with out Glassfish, only
Open ESB.
The log are been recorded on file
OpenESB-SE-3.1.2.3-a/OE-Instance/log/server.log but this file is growing
without restrictions.
How can I limit the size of the file?
Or  how can I implement a solution in order the log file not will be more
that 2Mb for example?



--
Sent from: http://openesb-community-forum.794670.n2.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Server.log max size

Paul Perez
Administrator
Hello José,
It is the first time that someone ask for this obvious requirement. Let us check how to do it.
Thank you for your interest in OpenESB

Paul


On 10 Jul 2019 at 22:15, <[hidden email]> wrote:

Hi,  

I have Open ESB v3.1 installed as an standalone with out Glassfish, only
Open ESB.  
The log are been recorded on file
OpenESB-SE-3.1.2.3-a/OE-Instance/log/server.log but this file is growing
without restrictions.
How can I limit the size of the file?
Or  how can I implement a solution in order the log file not will be more
that 2Mb for example?



--
Sent from: http://openesb-community-forum.794670.n2.nabble.com/

www.pymma.com The best services on OpenESB
Reply | Threaded
Open this post in threaded view
|

Re: Server.log max size

vishnu.piskala
In reply to this post by OpenESB Community Forum mailing list
You can configure for creation of new file every day at 00:00 am by adding net.openesb.standalone.logging.FileHandler.rotatable=true in logger.properties. I'm not sure if it is possible to control the file size.

-----Original Message-----
From: User <[hidden email]> On Behalf Of Jose Gonzales via User
Sent: 11 July 2019 01:46
To: [hidden email]
Cc: Jose Gonzales <[hidden email]>
Subject: [User] Server.log max size

Hi,

I have Open ESB v3.1 installed as an standalone with out Glassfish, only Open ESB.
The log are been recorded on file
OpenESB-SE-3.1.2.3-a/OE-Instance/log/server.log but this file is growing without restrictions.
How can I limit the size of the file?
Or  how can I implement a solution in order the log file not will be more that 2Mb for example?



--
Sent from: http://openesb-community-forum.794670.n2.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Server.log max size

OpenESB Community Forum mailing list
In reply to this post by Paul Perez

In FileHandler.java (net.openesb.standalone.logging) there is mention of a configuration parameter ‘rotatable’ that should cause the log file to rotate on the first write after midnight – a good place to begin the search?

 

Dave.

 

From: User <[hidden email]> On Behalf Of paul.perez
Sent: 11 July 2019 10:21
To: Jose Gonzales via User <[hidden email]>
Subject: Re: [User] Server.log max size

 

Hello José,

It is the first time that someone ask for this obvious requirement. Let us check how to do it.

Thank you for your interest in OpenESB

 

Paul

On 10 Jul 2019 at 22:15, <[hidden email]> wrote:

Hi,  
 
I have Open ESB v3.1 installed as an standalone with out Glassfish, only
Open ESB.  
The log are been recorded on file
OpenESB-SE-3.1.2.3-a/OE-Instance/log/server.log but this file is growing
without restrictions.
How can I limit the size of the file?
Or  how can I implement a solution in order the log file not will be more
that 2Mb for example?
 
 
 
--
Sent from: http://openesb-community-forum.794670.n2.nabble.com/

 

Reply | Threaded
Open this post in threaded view
|

Re: Server.log max size

andres (at) pruna.com.ar
In Linux you can find online some log rotate auxiliary scripts that might help. 

El El jue, 11 jul. 2019 a las 07:10, Dave Woodman via User <[hidden email]> escribió:

In FileHandler.java (net.openesb.standalone.logging) there is mention of a configuration parameter ‘rotatable’ that should cause the log file to rotate on the first write after midnight – a good place to begin the search?

 

Dave.

 

From: User <[hidden email]> On Behalf Of paul.perez
Sent: 11 July 2019 10:21
To: Jose Gonzales via User <[hidden email]>
Subject: Re: [User] Server.log max size

 

Hello José,

It is the first time that someone ask for this obvious requirement. Let us check how to do it.

Thank you for your interest in OpenESB

 

Paul

On 10 Jul 2019 at 22:15, <[hidden email]> wrote:

Hi,  
 
I have Open ESB v3.1 installed as an standalone with out Glassfish, only
Open ESB.  
The log are been recorded on file
OpenESB-SE-3.1.2.3-a/OE-Instance/log/server.log but this file is growing
without restrictions.
How can I limit the size of the file?
Or  how can I implement a solution in order the log file not will be more
that 2Mb for example?
 
 
 
--
Sent from: http://openesb-community-forum.794670.n2.nabble.com/

 

--
   Andrés P. Ferrando
http://www.pruna.com.ar/
Reply | Threaded
Open this post in threaded view
|

Re: Server.log max size

Piotr Tajduś
In reply to this post by OpenESB Community Forum mailing list
Hi,
In our installation I have installed log4j 2 through slf4j api - there
you can configure almost everything. Its rather simple, as far as i
remember you need to:
- put slf4j jars into lib/ext
- change handler to "handlers=org.slf4j.bridge.SLF4JBridgeHandler"
- add log4j jars to classpath on startup (f.e. in openesb.sh):
              -cp
"$OPENESB_BOOT_CLASSPATH:$OPENESB_HOME/lib/ext/jansi-1.11.jar:$OPENESB_HOME/lib/ext/jul-to-slf4j-1.7.21.jar:$OPENESB_HOME/lib/ext/slf4j-api-1.7.6.jar:$OPENESB_HOME/lib/ext/log4j-api-2.5.jar:$OPENESB_HOME/lib/ext/log4j-core-2.5.jar:$OPENESB_HOME/lib/ext/log4j-slf4j-impl-2.5.jar:$OPENESB_HOME/lib/ext/log4j-1.2-api-2.5.jar"
\


Here is my log4j.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn">
<Appenders>
         <RollingFile name="RollingFile"
fileName="${sys:openesb.home}/logs/esb.log"
filePattern="${sys:openesb.home}/logs/$${date:yyyy-MM}/esb-%d{yyyy-MM-dd_hh}-%i.log.gz">

<PatternLayout>
             <Pattern>%d %p %c{10} [%t] %m%n</Pattern>
</PatternLayout>
<Policies>
             <TimeBasedTriggeringPolicy />
             <SizeBasedTriggeringPolicy size="10 MB"/>
</Policies>
           <DefaultRolloverStrategy max="200"/>
</RollingFile>
</Appenders>
<Loggers>
         <Root level="all">
           <AppenderRef ref="RollingFile"/>
</Root>
         <logger name="com.atomikos" level="WARN">
             <AppenderRef ref="RollingFile"/>
</logger>
</Loggers>
</Configuration>


Best regards,
Piotr

On 10.07.2019 22:15, Jose Gonzales via User wrote:

> Hi,
>
> I have Open ESB v3.1 installed as an standalone with out Glassfish, only
> Open ESB.
> The log are been recorded on file
> OpenESB-SE-3.1.2.3-a/OE-Instance/log/server.log but this file is growing
> without restrictions.
> How can I limit the size of the file?
> Or  how can I implement a solution in order the log file not will be more
> that 2Mb for example?
>
>
>
> --
> Sent from: http://openesb-community-forum.794670.n2.nabble.com/


Reply | Threaded
Open this post in threaded view
|

Re: Server.log max size

Paul Perez
Administrator
In reply to this post by andres (at) pruna.com.ar
Hello
Thank for all of you that send me solution about this topic.

*Vishnu* explained as follows:
you can configure for creation of new file every day at 00:00 by adding
net.openesb.standalone.logging.FileHandler.rotatable=true in logger
properties. I'm not sure if it is possible to control the size

Marti added: you can add a prefix for the log file name:
net.openesb.standalone.logging.FileHandler.prefix=openesb-

Also, you can have a look on David's documentation:
https://openesb.atlassian.net/browse/OESE-48

Thank you for all I hope it solve your issue

Paul




-----
www.pymma.com
The best services on OpenESB
--
Sent from: http://openesb-community-forum.794670.n2.nabble.com/
www.pymma.com The best services on OpenESB