[JAVA][Log4j manual].pdf
(
2778 KB
)
Pobierz
The Complete log4j Manual
Ceki Gülcü
This manual applies to log4j version 1.2 and later.
The complete log4j Manual
by Ceki Gülcü
Copyright © 2000-2002 Ceki Gülcü, All rights reserved.
The illustration of the Dromaeosaur (a feathered Dinosaur) on the cover is copyrighted by Mick Elli-
son. Reproduced with permission.
You are authorized to download one copy of the electronic book entitled "The complete log4j Manual"
and associated software written by Ceki Gülcü, hereafter referred to as the Work. The Author grants
you a nonexclusive, nontransferable license to use this Work according to the terms and conditions
herein. This License permits you to install the Work for your personal use only.
You may not (i) modify or translate all or part of the Work (ii) create derivative works of the
Work (iii) sublicense, publish, loan, lease, rent, distribute, sell, timeshare, or transfer all or part
of the Work or any rights granted hereunder to any other person or entity; (ii) duplicate the
Work, except for a single backup or archival copy; (iii) alter or remove any proprietary notices
(including copyright notices), labels or marks appearing in the Work.
The Work is owned by its author and is protected by international copyright and other intellectual prop-
erty laws. The Author reserves all rights in the Work not expressly granted herein. This license and
your right to use the Work terminate automatically if you violate any part of this Agreement. In the
event of termination, you must destroy the original and all copies of the Work.
THE WORK IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
CHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN
NO EVENT SHALL CEKI GÜLCÜ OR ANY OTHER CONTRIBUTOR BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE WORK
OR THE USE OR OTHER DEALINGS IN THE WORK.
THE WORK COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ER-
RORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE
CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE WORK. THE AUTHORS
MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PUBLICATION(S) AND/OR THE
PROGRAM(S) DESCRIBED IN THIS WORK AT ANY TIME.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsys-
tems, Inc., in the United States and other countries.
Table of Contents
TABLE OF CONTENTS .....................................................................................................IV
FOREWORD........................................................................................................................... 7
PREFACE................................................................................................................................ 9
C
ONTENTS OF THIS
B
OOK
...................................................................................................... 9
C
ONVENTIONS
U
SED
I
N
T
HIS
B
OOK
.................................................................................... 10
C
OMMENTS AND
Q
UESTIONS
............................................................................................... 11
A
CKNOWLEDGMENTS
.......................................................................................................... 11
1.
INTRODUCTION........................................................................................................ 13
I
NSTALLING
......................................................................................................................... 14
R
UNNING THE
E
XAMPLES
.................................................................................................... 14
F
IRST
B
ABY
S
TEP
................................................................................................................ 15
R
ECIPE FOR USING LOG
4
J IN YOUR APPLICATIONS
............................................................... 16
B
UILDING LOG
4
J
.................................................................................................................. 17
2.
LOG4J ARCHITECTURE ......................................................................................... 19
L
OGGER HIERARCHY
........................................................................................................... 19
L
OGGER CREATION AND RETRIEVAL
................................................................................... 21
L
EVELS
................................................................................................................................ 22
L
OGGER
-L
EVEL FILTER
....................................................................................................... 26
H
IERARCHY
-
WIDE
T
HRESHOLD
F
ILTER
............................................................................... 27
P
RINTING EXCEPTIONS
........................................................................................................ 29
A
PPENDERS
......................................................................................................................... 30
L
AYOUTS
............................................................................................................................. 33
O
BJECT
R
ENDERING
............................................................................................................ 34
A P
EEK UNDER THE
H
OOD
................................................................................................... 35
L
OGGING
E
VENT CLASS
....................................................................................................... 36
P
ERFORMANCE
.................................................................................................................... 37
3.
CONFIGURATION SCRIPTS ................................................................................... 43
S
IMPLEST APPROACH USING
B
ASIC
C
ONFIGURATOR
............................................................ 43
S
YNTAX OF
C
ONFIGURATION
F
ILES IN
P
ROPERTIES FORMAT
.............................................. 47
S
ETTING THE HIERARCHY
-
WIDE THRESHOLD
...................................................................... 52
S
ETTING THE LEVEL OF A LOGGER
....................................................................................... 52
S
ETTING THE THRESHOLD OF AN
A
PPENDER
....................................................................... 55
M
ULTIPLE APPENDERS
......................................................................................................... 56
C
ONFIGURATION FILES IN
XML .......................................................................................... 60
S
YNTAX OF
XML
SCRIPTS
................................................................................................... 61
S
ETTING A HIERARCHY
-
WIDE THRESHOLD
(XML).............................................................. 68
S
ETTING THE LEVEL OF A LOGGER
(XML) .......................................................................... 68
S
ETTING THE THRESHOLD OF AN
A
PPENDER
(XML)........................................................... 72
Plik z chomika:
nimtiz
Inne pliki z tego folderu:
[HTML][HTML5 Canvas. Graphics. Animation and Game Development].pdf
(29804 KB)
[CSS][CSS3 Foundations].pdf
(23466 KB)
[JAVASCRIPT][Professional AngularJS].pdf
(21169 KB)
[HTML][HTML5 Foundations].pdf
(32597 KB)
[JAVASCRIPT][Beginning JavaScript Charts].pdf
(19671 KB)
Inne foldery tego chomika:
Books
Fruity Loops
Prywatne
Virtual Machines
Workout Books
Zgłoś jeśli
naruszono regulamin