"priya" <priya@i7asia.co.in> writes:
> I am using a logger for my application.
> The Logger works fine with Windows but it does not do so with the UNIX
> environment.
> The peoblem is that in Unix the Log file does not get created.
> Please if nay one can help me do so.........
> Its very important....
>
You might want to try using an absolute path for the log file. Try
'%t/pbs_server_%g%u.log' instead of './log/pbs_server_%g%u.log'. My
guess is that './log' has certain permissions around it.
>
> The code is pasted here:
>
> This is the file for settting the default handlers.
>
> ################# SETTING UP DEFAULT HANDLERS #################
>
>
> ## we are setting up two handlers - The filehandler - The messages will
> ## be written in to the file
>
> ## another is the consoler handler - The messages will be printed on to
> the console
>
> ####### INFO : A logger can have any number of handlers associated
> ####### with it.
>
> handlers=java.util.logging.FileHandler,java.util.logging.ConsoleHandler
>
>
> ################# SETTING UP FORMATTERS #################
>
> .level=FINEST
>
>
>
> ################# SETTING UP DEFAULT PROPERTIES FOR FileHandler
> #################
>
>
> ## FOR CLEAR INFO : Have a look in to the API docs for
> java.util.logging.FileHandler
>
> #1. This reprsents the number of bytes to be written val = 0 no limit
> java.util.logging.FileHandler.limit = 1000
>
> #2. How many output files to cycle through
> #java.util.logging.FileHandler.count = 5
>
> #3.Specifies how to format the string - Default is XMLFormatter
> java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
>
> #4. Append any logging DEFAULT = false
> java.util.logging.FileHandler.append = true
>
> #5. Level from which to start logging - DEFAULT = Level.ALL
> java.util.logging.FileHandler.level = FINEST
>
> #6. How the file generated will be named and where it would be present
> # %g -> Gereartion number to distinguish rotated logs like erro1.log ,
> error2.log..
>
> #If no "%g" field has been specified and the file count is greater than one,
> then
> #the generation number will be added to the end of the generated filename,
> after
> # a dot.
>
> # %u -> Thus if three processes were all trying to log to fred%u.%g.txt then
> #they might end up using fred0.0.txt, fred1.0.txt, fred2.0.txt as the first
> #file in their rotating sequences.
> # %t --> temp directory in your machine
> #java.util.logging.FileHandler.pattern = "%t/pbs_server_%g%u.log
> java.util.logging.FileHandler.pattern = ./log/pbs_server_%g%u.log
>
>
> ################# SETTING UP DEFAULT PROPERTIES FOR ConsoleHandler
> #################
>
> #1. Setting up level of echoing to the console all message having val >=
> fine are
> # echoed
> java.util.logging.ConsoleHandler.level = FINEST
>
> #2. THe messages are echoed after applying simple formating to text
> java.util.logging.Formatter = java.util.logging.SimpleFormatter
>
>
> ############################################################################
> ########
>
>
> ######################### FACILITY SPECIFIC
> #######################################
>
> com.samskip.pbs.server.db.level = FINEST
> com.samskip.pbs.server.services.level = FINEST
> com.samskip.pbs.server.bookinglayer.level = FINEST
> com.samskip.pbs.common = FINER
>
> ############################################################################
> ########
>
>
>
> --
> To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
|