RE: problems with logging to files

"Guijarro, Julio" <[email protected]> Tue, 22 Nov 2005 19:27:49 -0000
Newsgroups gmane.comp.java.smartfrog.devel
Message-ID <[email protected]>
Hi Andreas,

The answer for:
> 1. I would like to have just one log file. How can I force everything
to
> be logged just into one file /var/log/smartfrog.log ?

You need to add a property that it was not provided as an example in
default.ini (but it is described in the logging manual):

org.smartfrog.sfcore.logging.LogToFileImpl.useLogNameInFileName=false

The default value is true.

The problem is that the LogToFile writer does not append the data if the
file already exists. So, I have modified the code in CVS to use append
by default and added a new configuration attribute to LogToFile:
org.smartfrog.sfcore.logging.LogToFileImpl.append=true

> 2. If 1 is not possible, how can I force SF to not use whitespaces in
the
> filenames?

I have also modified the code in CVS to replace spaces with "_". 


Regards, 

Julio Guijarro

> -----Original Message-----
> From: smartfrog-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:smartfrog-
> developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Andreas
Unterkircher
> Sent: 21 November 2005 15:18
> To: smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Subject: [Smartfrog-developer] problems with logging to files
> 
> 
> I'm using the latest SmartFrog dist, 3.08.000 with logging to a file,
i.e.
> in default.ini has:
> 
> 
>
org.smartfrog.sfcore.logging.LogImpl.localLoggerClass=org.smartfrog.sfco
re
> .logging.LogToFileImpl
> 
>    org.smartfrog.sfcore.logging.LogToFileImpl.showMethodCall=false
>    org.smartfrog.sfcore.logging.LogToFileImpl.showDateTime=false
>
org.smartfrog.sfcore.logging.LogToFileImpl.fileNamePrefix="smartfrog"
>
org.smartfrog.sfcore.logging.LogToFileImpl.useHostNameInFileName=false
>
org.smartfrog.sfcore.logging.LogToFileImpl.useProcessNameInFileName=fals
e
>    org.smartfrog.sfcore.logging.LogToFileImpl.path="/var/log"
>    org.smartfrog.sfcore.logging.LogToFileImpl.useDatedFileName=false
> 
> Now I notice that this causes a separate log file for every component
I
> deploy into the system. Furthermore the filenames have a whitspace
which
> make them difficult to view on Linux:
> 
> smartfrog_HOST hostname.mydomain.org_rootProcess_sfDefault.sf.log
> smartfrog_HOST hostname.mydomain.org_rootProcess.sf.log
> smartfrog_HOST
> hostname.mydomain.org_rootProcess_torqueClientInstall_myShell.sf.log
> smartfrog_HOST
> hostname.mydomain.org_rootProcess_torqueClientInstall.sf.log
> smartfrog_SFCORE_LOG.sf.log
> smartfrog_.sf.log
> 
> I have two questions:
> 
> 1. I would like to have just one log file. How can I force everything
to
> be logged just into one file /var/log/smartfrog.log ?
> 
> 2. If 1 is not possible, how can I force SF to not use whitespaces in
the
> filenames ?
> 
> Thanks,
> Andreas
> 
> --
> http://cern.ch/openlab
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
> Register for a JBoss Training Course.  Free Certification Exam
> for All Training Attendees Through End of 2005. For more info visit:
> http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
> _______________________________________________
> Smartfrog-developer mailing list
> Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/smartfrog-developer


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id845&op=click