dev@glassfish.java.net

Re: logging.properties file

From: Carla Mott <Carla.Mott_at_Sun.COM>
Date: Thu, 11 Sep 2008 14:15:31 -0700

Hi Dixie,

Here is the file that is currently in the workspace. I will be happy to
review what you write and let me know if you have any questions.

Carla

Dixie Pine wrote:
> Hello Carla,
>
> I'll be documenting the logging.properties file in the Prelude Admin
> Guide. Can you send me a copy of the file? I'll look at the
> instructions you added to the file and see what I can come up with for
> the manual. I'll put your name as reviewer for the Administering Logging
> chapter in the Prelude Admin Guide, okay?
>
> Dixie
>
> On 09/10/08 02:47 PM, June.Parks_at_Sun.COM wrote:
>> On 09/10/08 14:33, Dixie Pine wrote:
>>>
>>>
>>> On 09/10/08 02:02 PM, June.Parks_at_Sun.COM wrote:
>>>> On 09/10/08 13:48, Carla Mott wrote:
>>>>> June.Parks_at_Sun.COM wrote:
>>>>>> Will the domain.xml elements be used after Prelude or are they
>>>>>> going away permanently?
>>>>> They will go away permanently. Not sure exactly when but before v3
>>>>> goes final.
>>>> So in the domain.xml doc I should note that log-service is not
>>>> implemented.
>>>>>>
>>>>>> Is editing the logging.properties file the only way to set log
>>>>>> levels, or can users also use the GUI or CLI?
>>>>> There is no tool support for editing the file with this release.
>>>>> Tool support will come later but you need to talk to the tools
>>>>> folks to get a time line.
>>>> In that case, you should get with the Admin Guide writer, Dixie
>>>> Pine, and explain to her how it works. Most of the logging info is
>>>> in that book.
>>> Yes! Carla, are you the official dev reviewer for logging for
>>> Prelude? I have a chapter on administering logging in the Admin
>>> guide, so I need to know what a user has to do to administer logging.
>>> If there's no GUI and no CLI for Prelude, then I guess it's about
>>> editing this new file.
>>>
>>> *June:* I don't currently house any actual files in the Admin Guide.
>>> Would the actual file go into a admin reference doc? Then I would
>>> link to it from the logging tasks chapter?
>> I don't really doc any non-developer files except domain.xml. And the
>> Admin Guide does doc other files, such as security key files and the
>> file realm users file.
>>
>> June
>>>>
>>>> June
>>>>>
>>>>> Carla
>>>>>
>>>>>
>>>>>>
>>>>>> June
>>>>>>
>>>>>> On 09/10/08 13:34, Carla Mott wrote:
>>>>>>> There are changes in the logger that need to be documented but
>>>>>>> not sure where they should end up. For v3 prelude users need to
>>>>>>> edit the logging.properties file to configure the logger. This
>>>>>>> file is in the same directory as domain.xml.
>>>>>>>
>>>>>>> We do support dynamically updating the logger level in v3
>>>>>>> prelude. This means that the server doesn't need to be restarted
>>>>>>> for the new value to take affect. The only way to do this for
>>>>>>> prelude is to edit the logging.properties file as there is no
>>>>>>> tool support yet. I did put examples of what the user needs to
>>>>>>> do to set the logging levels at the end of the logging.properties
>>>>>>> file.
>>>>>>>
>>>>>>>
>>>>>>> Carla
>>>>>>
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: docs-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: docs-help_at_glassfish.dev.java.net
>>>>
>>



############################################################
# Default Logging Configuration File
#
# You can use a different file by specifying a filename
# with the java.util.logging.config.file system property.
# For example java -Djava.util.logging.config.file=myfile
############################################################

############################################################
# Global properties
############################################################

# "handlers" specifies a comma separated list of log Handler
# classes. These handlers will be installed during VM startup.
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.

# In glassfish, it is not a good idea to add handlers this way
# as it requires the handler to be on the system classpath.
# A better approach is to define an HK2 component wich implements
# the Hanlder contract :
#
# @Service(name="console")
# @ContractProvided(Handler.class)
# public class MyConsoleHandler implements Handler {
# // implementation of Handler interface
# }

handlers= java.util.logging.ConsoleHandler

# To also add the FileHandler, use the following line instead.
#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler

# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers. For any given facility this global level
# can be overriden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
.level= INFO

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

# this is the default hanlder for Glassfish, it writes to a log file
# The handler is not registered through the handlers property above
# because the implementation is not on the system class path.
# GlassFish will register this handler automtically as it is
# and HK2 component like described above.
# rotates the file based on time or size.
com.sun.enterprise.server.logging.FileandSyslogHandler.file=logs/server.log
# rotation time in minutes (takes precedence on size if defined),
# 0 for no rotation based on time
com.sun.enterprise.server.logging.FileandSyslogHandler.rotationTimelimitInMinutes=0
# rotation limit in bytes, 0 means no rotation, 500000 is the minimum
com.sun.enterprise.server.logging.FileandSyslogHandler.rotationLimitInBytes=0
# formatter used to format the log records in the server log file
com.sun.enterprise.server.logging.FileandSyslogHandler.formatter=com.sun.enterprise.server.logging.UniformLogFormatter


# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = %h/java%u.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter

# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = com.sun.enterprise.server.logging.UniformLogFormatter


############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
com.xyz.foo.level = SEVERE

#Some logger names for v3 are below just uncoment the line logger below and save the file. The logging code will automatically be reconfigured.
#Tools Logger
#javax.enterprise.system.tools.level=FINE
# EJB Logger
#javax.enterprise.system.container.ejb.level=FINE
#SECURITY LOGGER
#javax.enterprise.system.core.security.level=FINE
#ADMIN LOGGER
#javax.enterprise.system.tools.admin.level=FINE
#ROOTLOGGER
#javax.enterprise.level=FINE
#WEB LOGGER
#javax.enterprise.system.container.web.level=FINE