########## LOG CONFIGURATION FOR PEER ########## ## Defining CorePeer Logger and Level. # The first parameter determines log4j Level. The most verbose Level is ALL (that actives all log levels), the current # level sequence is: ALL - DEBUG - INFO - WARN - ERROR - FATAL - OFF # The Second parameter determines the OurGrid Logger. It means that all log event rising from any class in any package # bellow org.ourgrid package will be "captured" by this logger. # The third parameter determines another OurGrid Logger. However, this logger will be used to write a xml log file. log4j.logger.org.ourgrid = DEBUG, ourgrid ## If You want to have .xml logs, you must comment the line above and uncomment the following line #log4j.logger.org.ourgrid = DEBUG, ourgrid, ourgridxml #### TXT LOGGER DEFINITIONS #### # Defining an Appender for OURGRID logger. An appender is responsable for writing log's events in some out-put (following we going to # set that out-put). We use RollingFileAppender to make log backups. log4j.appender.ourgrid = org.apache.log4j.DailyRollingFileAppender # Here, you can define the file path-name where you want to write your log messages. If you don't set any # file path-name here, OurGrid will set this property with a default value: Peer[localhostname_dd_mm_aaaa].log log4j.appender.ourgrid.file = # Defining a layout to write log messages. Here, you ca define how the messages will be shown in your log out-put. The PatternLayout # is a Layout defined by Log4j, and use pattern-codes to define a layout. The pattern-code that we use here will result in the following # out-put example: #[2005/09/29 10:42:58:437] INFO org.ourgrid.corepeer.main.Main.main ==> OurGrid Peer 3.3 is Up and Running! log4j.appender.ourgrid.layout = org.apache.log4j.PatternLayout log4j.appender.ourgrid.layout.conversionPattern = [%d{yyyy/MM/dd HH:mm:ss:SSS}] %-7p %c.%M ==> %m%n # Determines if the new log messages will be appended to the end of the log file. If it is set `true`, new log messages will be appended, # if it is set 'false', a new file will be created. log4j.appender.ourgrid.append = true # It actives the Buffer Properties of Log4j. If this property is activated, the log messages that arrives in this appender will be stored # in a buffer with a determined size. When this size is reached, the appender will write all messages buffered in one time. If this # property is turn-off, will occur imediate-flush, i.e, when a new message arrives, it will be write immediately. log4j.appender.ourgrid.BufferedIO = false # You can define the buffer size used when the property BufferedIO is set as 'true'. The dafault value is 8192 (determined by log4j). log4j.appender.ourgrid.BufferSize=4096 log4j.appender.ourgrid.DatePattern=.yyyy-MM-dd #### XML LOGGER DEFINITIONS #### # Defining another Appender for OURGRID logger. An appender is responsable for writing log's events in some out-put (following we going to # set that out-put). We use FileAppender to make log backups. log4j.appender.ourgridxml = org.apache.log4j.FileAppender # Here, you can define the file path-name where you want to write your xml log messages. If you don't set any # file path-name here, OurGrid will set this property with a default value: Peer[localhostname_dd_mm_aaaa].log.xml log4j.appender.ourgridxml.file = # Defining a layout to write log messages. Here, you ca define how the messages will be shown in your xml log out-put. Here we use # an OurGrid Xml Layout that is very importante to the correctly execution of the system, and you should not set this! :-) log4j.appender.ourgridxml.layout = org.ourgrid.common.xml.XMLLayout # Determines if the new log messages will be appended to the end of the log file. If it is set `true`, new log messages will be appended, # if it is set 'false', a new file will be created. log4j.appender.ourgridxml.append = true # It actives the Buffer Properties of Log4j. If this property is activated, the log messages that arrives in this appender will be stored # in a buffer with a determined size. When this size is reached, the appender will write all messages buffered in one time. If this # property is turn-off, will occur imediate-flush, i.e, when a new message arrives, it will be write immediately. log4j.appender.ourgridxml.BufferedIO = false # You can define the buffer size used when the property BufferedIO is set as 'true'. The dafault value is 8192 (determined by log4j). log4j.appender.ourgridxml.BufferSize=4096