Logging data - Storm Streaming Server

You can easily configure the way Storm Server logs most important operations and errors. To do so, please edit the config/log4j.xml file. The configuration will proceed like this:

<?xml version="1.0" encoding="UTF-8"?>
		<Console name="Console" target="SYSTEM_OUT">
			<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1} - %m%n"/>

		<RollingFile name="File" fileName="PATH_TO_LOG_DIRECTORY/log.log" filePattern="PATH_TO_LOG_DIRECTORY/log.%d{MM-dd-yyyy-HH-mm}.%i.log" ignoreExceptions="false">
		        <Pattern>%d{yyyy-MM-dd HH:mm:ss} %p %m%n</Pattern>
		        <OnStartupTriggeringPolicy />
		        <SizeBasedTriggeringPolicy size="10240 KB" />
		        <TimeBasedTriggeringPolicy />
		        <Delete basePath="PATH_TO_LOG_DIRECTORY/log" maxDepth="2">
		            <IfFileName glob="app.*.log" />
		            <IfLastModified age="20d" />

    	<Root level="All">
      		<AppenderRef ref="Console"/>
      		<AppenderRef ref="File"/>

Log levels

To limit the number of logs generated by the server, you can modify which log levels are displayed/saved.

    <Root level="All">
        <AppenderRef ref="Console"/>
        <AppenderRef ref="File"/>

Instead of “ALL” value level you can use:

OFFNo logs will be saved or displayed
FATALOnly logs related to server shutdown or malfunction
ERRORError in code execution
WARNInformation regarding potential problems
INFOInformation regarding current server operations
DEBUGNot recommended – for Debug only
TRACENot recommended – for Development only
Table 1. Log level values table