Hi again James,
It didnt work the setting of System property, maybe because I am not
being able to set in the correct time and place.
I am new in bea workshop integration and also in log4j api.
What happened was that when it came to the point that I set the System
propety, the log file was already created without the process Id written
on its name.
I also would like to say something about the 2 process instances
running together. I think they are running in the same JVM, because the
aplication is deployed in the same server, dont you think?
But thanks for the ideas, it is working now with the FileAppender
solution.
Silvana.
>>> "James Stauffer" <[EMAIL PROTECTED]> 29/03/2006 18:19 >>>
Yes, that should work. Those two processes will use 2 different JVMs
and there shouldn't be any conflicts.
On 3/29/06, Silvana Lima <[EMAIL PROTECTED]> wrote:
> ahh, now I got it!
> But will it work if there is more than one instance of the same
process
> running at the same time?
> I mean, two processes send out logs to the same appender and writing
on
> different lgo files?
> I will test!
> Thanks.
>
> >>> [EMAIL PROTECTED] 29/03/2006 17:44 >>>
> To do that using a config file, have your program call
> System.setProperty("pid", pid) before log4j is configured and use
the
> following in your config:
> <param name="File" value="${pid}workshop.log" />
>
> On 3/29/06, Silvana Lima <[EMAIL PROTECTED]> wrote:
> > Sorry but I didnt understand what you meant.
> >
> > I found this tutorial
> >
>
http://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/log4j/log4j.html#LOG4J-Basics-Layout
>
> >
> >
> > I am trying to implement with FileAppender
> >
> > org.apache.log4j.Logger myLog =
> > org.apache.log4j.Logger.getLogger(classeName);
> > FileAppender appender = null;
> > try {
> > appender = new FileAppender(new PatternLayout(),
ClassName
> +
> > "_"+ context.getInstanceId());
> > } catch(Exception e) {}
> >
> > myLog.addAppender(appender);
> > myLog.setLevel((Level) Level.INFO);
> >
> > myLog.info("Test Log");
> >
> > But thanks very much for the quick answer.
> >
> > >>> [EMAIL PROTECTED] 29/03/2006 16:06 >>>
> > If you can set the desired log name as a system property then it
> should
> > work.
> >
> > On 3/29/06, Silvana Lima <[EMAIL PROTECTED]> wrote:
> > > Hello to all,
> > >
> > > I am in a project using BEA - Workshop Integration in a Windows
> > plataform.
> > > I am trying to figure out if it is possible to create a log file
> > dynamically just when a java processe starts with the Process ID
as
> part
> > of the name of the log file.
> > >
> > > In the configuration file for Log4J it is used this
configuration
> > >
> > > <appender name="APPLOGFILE"
> > class="org.apache.log4j.RollingFileAppender">
> > > <param name="File" value="workshop.log" />
> > > <param name="Append" value="true" />
> > > <param name="MaxFileSize" value="3000KB" />
> > > <layout class="org.apache.log4j.PatternLayout">
> > > <param name="ConversionPattern" value="%d{DATE} %-5p
> %-15c{1}:
> > %m%n"/>
> > > </layout>
> > > </appender>
> > >
> > > <category name="wlw">
> > > <priority value="info" />
> > > <appender-ref ref="APPLOGFILE" />
> > > </category>
> > >
> > > ************************
> > > I created this
> > >
> > > <appender name="MYAPPLOGFILE"
> > class="org.apache.log4j.RollingFileAppender">
> > > <param name="File"
> > value="processes.VantiveInsertAddressSync.log" />
> > > <param name="Append" value="true" />
> > > <param name="MaxFileSize" value="3000KB" />
> > > <layout class="org.apache.log4j.PatternLayout">
> > > <param name="ConversionPattern" value="%d{DATE} %-5p
> %-15c{1}:
> > %m%n"/>
> > > </layout>
> > > </appender>
> > >
> > > <category
> >
>
name="xxx.eai.processes.vantive.manterendereco.VantiveInsertAddressSync">
> > > <priority value="info" />
> > > <appender-ref ref="MYAPPLOGFILE" />
> > > </category>
> > >
> > >
> > > This works to log the VantiveInsertAddressSync process itself.
But
> > the client wants a different log for each instance of the process.
> > > Is there a way to do this with log4J API?
> > >
> > > Thanks for any help
> > > Please reply to [EMAIL PROTECTED]
> > >
> > > Silvana.
> > >
> > >
> > >
> > >
> >
>
--------------------------------------------------------------------------------------------------------
> > > O conteúdo desta mensagem e de seus anexos é de uso restrito e
> > confidencial, sendo o seu sigilo protegido por lei. Estas
> informações
> > não podem ser divulgadas sem prévia autorização escrita. Se você
não
> é
> > o destinatário desta mensagem, ou o responsável pela sua entrega,
> > apague-a imediatamente e avise ao remetente, respondendo a esta
> > mensagem. Alertamos que esta mensagem transitou por rede pública
de
> > comunicação, estando, portanto, sujeita aos riscos inerentes a
essa
> > forma de comunicação. A QUALITY SOFTWARE não se responsabiliza por
> > conclusões, opiniões, ou outras informações nesta mensagem que não
> > tenham sido emitidas por seus integrantes.
> > >
> > >
> > > This e-mail and any attachments are confidential and may also be
> > privileged. If you are not the named recipient, please notify the
> sender
> > immediately and do not disclose the contents to any other person,
use
> it
> > for any purpose, or store or copy the information. In the event of
> any
> > technical difficulty with this email, please contact the sender.
> QUALITY
> > SOFTWARE is not responsible for conclusion, opinions or any kind
of
> > information in this message that doesn't come from our personnel.
> > >
> >
>
--------------------------------------------------------------------------------------------------------
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail:
[EMAIL PROTECTED]
>
> > >
> > >
> >
> >
> > --
> > James Stauffer
> > Are you good? Take the test at http://www.livingwaters.com/good/
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
--------------------------------------------------------------------------------------------------------
> > O conteúdo desta mensagem e de seus anexos é de uso restrito e
> confidencial, sendo o seu sigilo protegido por lei. Estas
informações
> não podem ser divulgadas sem prévia autorização escrita. Se você não
é
> o destinatário desta mensagem, ou o responsável pela sua entrega,
> apague-a imediatamente e avise ao remetente, respondendo a esta
> mensagem. Alertamos que esta mensagem transitou por rede pública de
> comunicação, estando, portanto, sujeita aos riscos inerentes a essa
> forma de comunicação. A QUALITY SOFTWARE não se responsabiliza por
> conclusões, opiniões, ou outras informações nesta mensagem que não
> tenham sido emitidas por seus integrantes.
> >
> >
> > This e-mail and any attachments are confidential and may also be
> privileged. If you are not the named recipient, please notify the
sender
> immediately and do not disclose the contents to any other person, use
it
> for any purpose, or store or copy the information. In the event of
any
> technical difficulty with this email, please contact the sender.
QUALITY
> SOFTWARE is not responsible for conclusion, opinions or any kind of
> information in this message that doesn't come from our personnel.
> >
>
--------------------------------------------------------------------------------------------------------
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
--------------------------------------------------------------------------------------------------------
> O conteúdo desta mensagem e de seus anexos é de uso restrito e
confidencial, sendo o seu sigilo protegido por lei. Estas informações
não podem ser divulgadas sem prévia autorização escrita. Se você não é
o destinatário desta mensagem, ou o responsável pela sua entrega,
apague-a imediatamente e avise ao remetente, respondendo a esta
mensagem. Alertamos que esta mensagem transitou por rede pública de
comunicação, estando, portanto, sujeita aos riscos inerentes a essa
forma de comunicação. A QUALITY SOFTWARE não se responsabiliza por
conclusões, opiniões, ou outras informações nesta mensagem que não
tenham sido emitidas por seus integrantes.
>
>
> This e-mail and any attachments are confidential and may also be
privileged. If you are not the named recipient, please notify the sender
immediately and do not disclose the contents to any other person, use it
for any purpose, or store or copy the information. In the event of any
technical difficulty with this email, please contact the sender. QUALITY
SOFTWARE is not responsible for conclusion, opinions or any kind of
information in this message that doesn't come from our personnel.
>
--------------------------------------------------------------------------------------------------------
>
>
--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
--------------------------------------------------------------------------------------------------------
O conteúdo desta mensagem e de seus anexos é de uso restrito e confidencial,
sendo o seu sigilo protegido por lei. Estas informações não podem ser
divulgadas sem prévia autorização escrita. Se você não é o destinatário desta
mensagem, ou o responsável pela sua entrega, apague-a imediatamente e avise ao
remetente, respondendo a esta mensagem. Alertamos que esta mensagem transitou
por rede pública de comunicação, estando, portanto, sujeita aos riscos
inerentes a essa forma de comunicação. A QUALITY SOFTWARE não se responsabiliza
por conclusões, opiniões, ou outras informações nesta mensagem que não tenham
sido emitidas por seus integrantes.
This e-mail and any attachments are confidential and may also be privileged. If
you are not the named recipient, please notify the sender immediately and do
not disclose the contents to any other person, use it for any purpose, or store
or copy the information. In the event of any technical difficulty with this
email, please contact the sender. QUALITY SOFTWARE is not responsible for
conclusion, opinions or any kind of information in this message that doesnt
come from our personnel.
--------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]