avalon-phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Royal <pro...@apache.org>
Subject Re: How to enable console logging in Phoenix
Date Thu, 21 Nov 2002 18:33:09 GMT
On Thursday, November 21, 2002, at 04:08  AM, Raj Saini wrote:
> It is not yet clear to me how to set the target to console. I have my  
> environment.xml file appended below. I shall be thankful if you can  
> make  required changes in the configuration below.

Use the below block as the "logs" section of your environment.xml
-pete

	<logs version="1.1">
		<!--+ FACTORIES
		      +   Factories define various types of output targets for log  
messages
		      +-->
		<factories>
			<factory type="stream"  
class="org.apache.avalon.excalibur.logger.factory.StreamTargetFactory"/ >
		</factories>
		<!--+ TARGETS
		      +   Targets are named destinations of log events. Tag names for  
child
		      +   elements, such as 'file' or 'screen', correspond to factory  
types above.
		      +-->
		<targets>
			<!-- Outputs events to the screen. -->
			<stream id="sout">
                 <stream>System.out</stream>
				<format type="avalon">%8.8{priority} %{time:(yyyy-MM-dd)  
HH:mm.ss:SSS} [%8.8{category}] (%{thread}) %{class:short}:  
%{message}\n%{throwable}</format>
			</stream>
		</targets>
		<!--+ CATEGORIES
		      +   Categories are named sinks for the application to output  
events to.
		      +   First level category names correspond to block names in  
assembly.xml.
		      +
		      +   Each category has an attribute named log-level that  
controls the severity
		      +   of messages to records. Valid severities are:
		      +     DEBUG, INFO, WARN, ERROR, FATAL_ERROR
		      +
		      +   Each category can have children of other categories, and  
log-target elements
		      +   log-target elements have an id-ref attribute that  
references the id of a target
		      +   in the targets section.
		      +-->
		<categories>
			<!-- anything that doesn't fit into the above categories falls into  
here -->
			<category name="" log-level="DEBUG">
                 <log-target id-ref="sout"/>
			</category>
		</categories>
	</logs>


--
To unsubscribe, e-mail:   <mailto:avalon-phoenix-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-phoenix-dev-help@jakarta.apache.org>


Mime
View raw message