Description:
The configuration object of the writer. This object contain the properities of a writers, and it is used to create writers by {@link com.toc.logging.writer.WriterFactory WriterFactory}.
The properities list below:
Property Name Description Default Value {@link WriterConfig#domain domain} The domain of the write, it is the class path which can decide the writer will write the message come from which class. {@code null} {@link WriterConfig#pattern pattern} The pattern of the message. {@link com.toc.logging.Log#DEFAULT_PATTERN DEFAULT_PATTERN} {@link WriterConfig#target target} The target where writer will write the log message. {@link com.toc.logging.Log#DEFAULT_TARGET DEFAULT_TARGET} {@link WriterConfig#output output} Output will decide which type of message writer will write to target. {@link com.toc.logging.Log#DEFAULT_OUTPUT DEFAULT_OUTPUT} {@link WriterConfig#filePath filePath} File path is defined where to put the log files, it is a absolute path(full path) of the system. {@code null} {@link WriterConfig#logPath logPath} This parameter defined where to put the log history file if {@code maxFileSize} or {@code separateFrequency} is enabled. It is a absolute path(full path) of the system. {@code null} {@link WriterConfig#fileName fileName} The log file name, for the name of log history file is [File Last Modify Date(YYYYMMDD)][ {@code fileName}].[Create Time(YYYYMMDDHHMISS)][n(n is a sequence #)]. {@code null} {@link WriterConfig#maxFileSize maxFileSize} The max size of the log file(Measurement in MB), any value < 1 will be seems as no limited. {@code 0} {@link WriterConfig#stream stream} The {@link OutputStream} object when the writer target contains {@link com.toc.logging.Log#STREAM STREAM} (Not support yet) {@code null} {@link WriterConfig#datePattern datePattern} Date pattern is define the date display style in log file, the symbol of the pattern refer to {@link java.text.SimpleDateFormat} {@link com.toc.logging.Log#DEFAULT_DATE_PATTERN DEFAULT_DATE_PATTERN} {@link WriterConfig#separateFrequency separateFrequency} The frequency to separate the log file, once the interval is arrived, the log file will be move to History folder. {@link com.toc.logging.Log#NEVER NEVER} {@link WriterConfig#enabled enabled} If the writer is enabled. {@code true} {@link WriterConfig#wellFormat wellFormat} The flag indicate if the well format function is open. {@code false}
The code of message pattern list below:
Code Description {@link com.toc.logging.Log#MESSAGE %M} This code indicate the message user input as a parameter via logging method {@link com.toc.logging.Log#DATE %D} This code indicate the current system date time, the display format is define in {@link WriterConfig}. Default format is "yyyy-MM-dd HH:mm:ss". {@link com.toc.logging.Log#CLASS %C} This code indicate the local where the logging function was called. The local information include the package path, class name and method name. {@link com.toc.logging.Log#LINE %L} This code indicate the line number where the logging function was called. {@link com.toc.logging.Log#THREAD %t} This code indicate the current thread name. {@link com.toc.logging.Log#TYPE %T} This code indicate the severity level type of the logging message (DEBUG, INFO, WARN or ERROR).
Copyright: Copyright (c) 2009 Thousand Origami Cranes Corp.
Create Time: 25 Dec 2009 16:00:28
Author: Kevin.Zhou
@version 1.0
@see com.toc.logging.Configuration
@see com.toc.logging.writer.WriterFactory
@see com.toc.logging.Log
|
|
|
|
|
|
|
|