0% found this document useful (0 votes)
11 views16 pages

TAFJ Logging

Uploaded by

tienmh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views16 pages

TAFJ Logging

Uploaded by

tienmh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Doc u m e n t Hist o r y

Revi si o
Dat e Ame n d e d Na m e De s c r i p t i o n
n
1 30 th Marc h 2019 TAFJ tea m Initial version
2 25 th Marc h 2020 S. Sakt hi R20 AMR Review

H. Sanofa r
3 14 th July 2020 Log4j 1.2 upd a t e
Nish a

4 12 th April 2021 S. Sakt hi R21 AMR Review

5 24 th Marc h 2022 Prass h a n t h R22 AMR Review

6 7 th June 2022 S. Sakt hi Custo m Logge r upd a t e

7 7 th April 2023 M.Kum a r R23 AMR Review

2
TAFJ Logging

Copyri g h t

Copyrig h t © Teme n o s Hea d q u a r t e r s SA 2009- 2023.


All right s rese rv e d.
This docu m e n t cont ain s prop rie t a r y inform a tio n that is prote c t e d by copyrig h t. No part of this docu m e n t may
be repro d u c e d , tra ns m i t t e d , or mad e availa ble direc tly or indirec tly to a third party without the expr e s s
writt e n agre e m e n t of TEMENOS UK Limite d. Receipt of this mate ri al direc tly TEMENO S UK Limite d
constit u t e s its expr e s s per mis sion to copy. Per mis sion to use or copy this docu m e n t expr e s sly exclud e s
modifying it for any purpo s e , or using it to cre a t e a derivative the r ef ro m .

Errat a and Com m e n t s


If you have any com m e n t s reg a r di n g this man u al or wish to repor t any error s in the docu m e n t a t i o n ,
plea s e docu m e n t the m and send the m to the add r e s s below:
Technology Depa r t m e n t
Teme no s Hea d q u a r t e r s SA
2 Rue de l’Ecole- de- Chimie,
CH - 1205 Geneva,
Switze rl a n d

Tel SB: +4 1 (0) 22 708 1150


Fax: +4 1 (0) 22 708 1160

Pleas e includ e your na m e , comp a n y, addr e s s, and telep h o n e and fax num b e r s , and email add r e s s if
applica bl e. TAFJdev@t e m e n o s . c o m

3 Teme no s Application Fra m e w o r k Java – (TAFJ)


Ta b l e o f C o n t e n t s

4
TAFJ Logging
Log g e r
T24 execu tion and TAFJ inter n al behavior could be monitor e d with logs.
Sta n d a r d logging APIs (SLF4J, Log4J 1.2, Log4J 2.x) are use d and a default logge r configu r a ti o n, writing
to files is provide d within:
<TAFJ_HO M E > \ c o n f \ T A FJTr a c e . p r o p e r t i e s .
This configu r a t i o n could be eithe r a Log4J 1.2 or Log4J2 configu r a t io n, depe n di n g eithe r on your TAFJ
version or on the runti m e configu r a t i o n.
This file is gen e r a t e d auto m a t i c a lly in the appr o p ri a t e Log4j 1.2 or Log4j 2 form a t if it’s not alre a dy
existin g.
The configu r a t io n allows:
- Cha n gi n g the default log level for all logge r s.

- Defining new logge r s and appe n d e r s .

For more inform a t i o n pleas e refer to the appro p r i a t e loggin g API docu m e n t a t i o n , links are provide d in
the relat e d section.
By default, seve r al differ e n t logge r s are define d, providing infor m a t io n relat e d to a specific topic: T24,
Data b a s e , Runtim e , MDB, EJB, etc…

Log api cu s t o m i z a t i o n

Default configu r a tio n


The default runti m e configu r a ti o n is makin g use natively eithe r of Log4j 1.2 or Log4j 2.

Since PB201 6 0 7 (June 2016 rele a s e ), historic al Log4j 1.2 configu r a t io n is switch e d to Log4j 2.

When upgr a di n g from an existin g installatio n to PB201 6 0 7 and highe r, any older existin g
TAFJTrac e. p r o p e r t i e s will be over ri d d e n to fit Log4j 2 form a t .
For backw a r d comp a ti bility this is still possibl e to use Log4j 1.2, but not reco m m e n d e d as furt h e r logging
enha n c e m e n t s are not going to be suppo r t e d with this log4j version.

Log 4j con fi g u r a t i o n
File TAFJTrac e . p r o p e r t i e s for mor e inform a ti o n see https://loggi n g. a p a c h e . o r g / log 4j/1.2/ m a n u a l . h t m l

Log 4j 2 co nf i g u r a t i o n
File TAFJTrac e . p r o p e r t i e s for mor e inform a ti o n see htt p://loggi n g. a p a c h e . o r g /l og 4j/ 2.x/

5 Teme no s Application Fra m e w o r k Java – (TAFJ)


Switchi n g log API
Since PB201 6 0 7 TAFJ runti m e gives the ability to use SLF4J as a façad e:
http://ww w. slf4j.or g/ m a n u a l. h t m
SLF4J allows choosin g at deploym e n t time the logging backe n d fram e w o r k.
As stat e d above TAFJ is curr e n t ly suppo r t i n g Log4j and Log4j2, henc e switchin g to SLF4J would make
sens e in case of wanti n g to use Log4j as a backe n d API to contin u e using any pre- PB2016 0 7
configu r a t io n.

Clas s p a t h set u p
To be able to use SLF4J and Log4j 1.2, som e class p a t h modificatio n nee d s to be done .
1- Remove log4j- api.jar and log4j- core.ja r from <TAFJ_HO M E > \ l i b

2- Add unde r <TAFJ_HO ME > \ l i b

o <TAFJ_HO M E > \ 3 r d P a r t y\ l o g g i n g \ s l f 4 j \ s l f 4j - api.jar

o <TAFJ_HO M E > \ 3 r d P a r t y\ l o g g i n g \ s l f 4 j \ s l f 4j . l o g 4 j 1 2 . j a r

Run t i m e set u p
To switch from native Log4j2 API to SLF4J, simply set the following syste m prope r t y.
Set up throu g h JVM arg u m e n t (apps e rv e r mode):
-Dtem e n o s .log. a pi = S L F 4J
Or set up throu g h environ m e n t variabl e s (sta n d al o n e mode tafj shell):
- Linux :

o expor t tem e n o s_log_a pi = SLF 4J

- Windows

o set tem e n o s.lo g. a pi = S L F 4J

To switch from native Log4j2 API to Teme n o s Com m o n Logge r API, simply set the following syst e m
prop e r t y.
Set up throu g h JVM arg u m e n t (apps e rv e r mode):
-Dtem e n o s .log. a pi = COMMO N
Or set up throu g h environ m e n t variabl e s (sta n d al o n e mode tafj shell):
- Linux :
6
TAFJ Logging
o expor t tem e n o s_log_a pi = COMMO N

- Windows

o set tem e n o s.lo g. a pi = COMMO N

With the Teme n o s COMMON logge r we have an option to choose the gen e r a t e log in one of the below
option (the r e by auto m a t i c a lly gen e r a t e the TAFJTrac e. p r o p e r t i e s on fly when missin g).
- STAN DAR D (default)

- SOCKET – redir e c t the appe n d e r s to logst a s h on localhost with defa ult port

- UNIQ UE - gene r a t e all the logs into a single file called tafj.log inst e a d of individu al log files per
modul e.

To switch the mode the following environ m e n t prop e r t y has to be set at star t u p.
- -Dt e m n . t a fj .l o g g i n g . g e n e r a t e . c o m m o n . a p p e n d e r s . m o d e =S OCKET

It has to be set at TAFJ star t up, and sh o u l d be don e thro u g h envir o n m e n t varia b l e s or JVM
arg u m e n t s

Backw a r d comp a ti bility, keep using log4j 1.2 natively


Clas s p a t h set u p
To be able to use Log4j 1.2, some class p a t h modificatio n nee ds to be done .
1. Remove log4j- api.jar and log4j- core.ja r from <TAFJ_HO M E > \ l i b

2. Downloa d Log4j 1.2 sepa r a t e ly and add unde r <TAFJ_HO M E > \ l i b

Run t i m e set u p
To switch from native Log4j2 API to Log4j 1.2, simply set the following syste m prop e r t y.
Set up throu g h JVM arg u m e n t (apps e rv e r mode):
-Dtem e n o s .log. a pi = L O G 4J
Or set up throu g h environ m e n t variabl e s (sta n d al o n e mode tafj shell):
- Linux :

o expor t tem e n o s_log_a pi =LOG4J

- Windows

o set tem e n o s.lo g. a pi = LOG4J

Log fold e r s cu s t o m i z a t i o n

By default you will find above mention e d logs unde r following folder s:
- <TAFJ_HO M E > / l o g : for TAFJ log s

7 Teme no s Application Fra m e w o r k Java – (TAFJ)


- <TAFJ_HO M E > / l o g _ T 2 4 : for T2 4 log s

This default beh avior could be over rid d e n by using following prop e r t i e s:
- te m e n o s . l o g . d i r e c t o r y = < PAT H_TO_YOUR_TAFJ_LOG_FOLDER >

- te m e n o s . l o g . d i r e c t o r y . t 2 4 = < PAT H_TO_YOUR_T24_LOG_FOLDER >

It has to be set at TAFJ star t up, and sh o u l d be don e thro u g h envir o n m e n t varia b l e s or JVM
arg u m e n t s .
You canno t use the tafj.pro p e r t i e s file for that pur pos e as logge r s get initialized before tafj prope r ti e s get
loade d.
Set up throu g h JVM arg u m e n t (apps e rv e r mode):
-Dtem e n o s .log.di r e c t o r y = / p a t h / t o/yo u r / c u s t o m /l og/fold e r

Set up throu g h environ m e n t varia bl e s (stan d a l o n e mode tafj shell):


- Linux :

o expor t tem e n o s_log_dir e c t o r y = ’ p a t h / t o/you r/ c u s t o m /l og/ di r e c t o r y’

- Windows

o set tem e n o s.lo g. di r e c t o r y = p a t h \ t o\you r \ c u s t o m \lo g\ di r e c t o r y

To reve r t this settin g in tafj shell, simply set the prop e r t y to an empty value.
- Linux :

o expor t tem e n o s_log_dir e c t o r y =

- Windows

o set tem e n o s.lo g. di r e c t o r y =

Log g i n g COMO

Whe n usi n g LOG4J2 as the logging API, it is possible to redi r e c t COMOs to a stan d a r d logge r.

Routin g and file app e n d e r


By default a routi ng appe n d e r will be define d to have each age n t logging to its own como file (stan d a r d
file appe n d e r ). The routi ng being define d by a thr e a d cont ext prop e r t y mat c hi n g the como nam e.
Simply set the following prop e r t y as syste m prop e r t y or JVM prope r t y at applica tio n star t up.
- te m e n o s . l o g . c o m o =t r u e

It will gene r a t e the “como” logge r and app e n d e r configu r a t io n within TAFJTrac e configu r a ti o n.
When using an existing deploym e n t , make sur e to delet e curr e n t TAFJTrac e configu r a t i o n file.

8
TAFJ Logging
The como appe n d e r and logge r will be define d in the newly gene r a t e d configu r a t i o n file.
i.e. when using prope r ti e s configu r a t i o n form a t .
app e n d e r . c o m o . t y p e = Routi n g
app e n d e r . c o m o . n a m e = co m o
app e n d e r . c o m o . r o u t e s . t y p e = Rou t e s
appe n d e r . c o m o . r o u t e s . p a t t e r n = $$ { c t x:CO M O- NA M E }
appe n d e r . c o m o . r o u t e s . r o u t e 1 . t y p e = Rout e
a p p e n d e r . c o m o . r o u t e s . r o u t e 1 . f i l e . t y p e = Fi l e
app e n d e r . c o m o . r o u t e s . r o u t e 1 . f il e . n a m e = co m o- $ { c t x: CO M O- NA M E }
appe n d e r . c o m o . r o u t e s . r o u t e 1 . file .file N a m e = ${ s y s: t e m e n o s .l o g . dir e c t o r y . c o m o } / $
{ctx:CO MO- NAM E }
a p p e n d e r . c o m o . r o u t e s . r o u t e 1 . f i l e . l a y o u t . t y p e = Pa t t e r n L a y o u t
appe n d e r . c o m o . r o u t e s . r o u t e 1 . file .layo u t . p a t t e r n = %m% n

By default COMOs log files are going to be gene r a t e d unde r


<TAFJ_HO M E > / l o g _ T 2 4 / c o m o
This default beh avior could be over rid d e n by using following prop e r t y:
- te m e n o s . l o g . d i r e c t o r y . c o m o = < P ATH_TO_YOUR_COMO_LOG_FOLDER >

Above prop e r t i e s hav e to be set at TAFJ start up, and sh o u l d be don e thro u g h envir o n m e n t
variab l e s or JVM arg u m e n t s .

Socke t appe n d e r and routin g and file app e n d e r

The above men tion e d routin g app e n d e r could be use d in conjun c tio n with a socke t app e n d e r to have
COMOs files gene r a t e d on a rem ot e logging serve r.
In this scen a r i o, TAFJ applica tio n will beco m e a client of the logging serve r.
The appe n d e r to use on TAFJTrac e configu r a t i o n side will be the following, i.e. whe n using prop e r t i e s
configu r a t io n form a t .
# S o c k e t cl i e n t a p p e n d e r t o b e u s e d t o r e d i r e c t c o m o fi l e s t o a b o v e r e m o t e r o u t i n g
appe n d e r
# S e t u p ap p r o p r i a t e ho s t n a m e an d po r t to m a t c h th e re m o t e log g i n g s e r v e r
appe n d e r . c o m o . t y p e = Soc k e t
app e n d e r . c o m o . n a m e = co m o
appe n d e r . c o m o . h o s t = 10.56. 7. 9 9
appe n d e r . c o m o . p o r t = 1212
appe n d e r . c o m o .l ay o u t . t y p e = Serializ e d L a y o u t
appe n d e r . c o m o . c o n n e c t Ti m e o u t M i llis = 2000
appe n d e r . c o m o . r e c o n n e c t i o n D e la y M illis = 1000 0

9 Teme no s Application Fra m e w o r k Java – (TAFJ)


app e n d e r . c o m o . p r o t o c o l = TCP

On the serve r side, the sam e routin g app e n d e r than define d above will be use d to receive the log event s
from the socke t and rout e the m to the app ro p r i a t e file.
1- Deploy on the logging serve r (LOG4J_HOME below) the following libra ri e s which can be found in
the TAFJ relea s e unde r 3rdP a r t y\log gi n g\log 4j 2:

o log4j- core.ja r

o log4j- api.jar

o jcom m a n d e r- 1.48.ja r

2- Copy on the serve r the TAFJTrac e configu r a t i o n defining the como routi ng app e n d e r

3- Sta r t the TCP socke t serve r with appro p r i a t e classp a t h and par a m e t e r s , i.e.

s e t L O G 4 J_ H O M E = C : \ l o 4 j - s o c k e t - s e r v e r - c o n f
se t CLA S S P A T H = % L O G 4J_HO M E % \*
s e t JA V A _ O P T S = - D t e m e n o s . l o g . d i r e c t o r y = % L O G 4 J _ H O M E % \ l o g
-D t e m e n o s . l o g . d i r e c t o r y . t 2 4 = % L O G 4 J _ H O M E % \ t 2 4 - l o g
-D t e m e n o s . l o g . d i r e c t o r y . c o m o = % L O G 4 J _ H O M E % \ c o m o - l o g

ja v a %J A V A _ O P T S % -c p % C L A S S P A T H %
o r g . a p a c h e . l o g g i n g . l o g 4 j . c o r e . n e t . s e r v e r . T c p S o c k e t S e r v e r -c % L O G 4 J _ H O M E
% \ T A F J T r a c e . x m l -p 1 2 1 2 --c l a s s e s ja v a . u t i l . C o l l e c t i o n s $ U n m o d i f i a b l e M a p --c l a s s e s
ja v a . u t i l . H a s h M a p

The TCP socke t serve r will be star t e d on the specified option -p port 1212 and defining the logge r
configu r a t io n comin g from option -c TAFJTrac e.x ml.
Com m u ni c a t i o n could optionally be secur e d by using SSL. Pleas e refe r to log4j2 docu m e n t a t i o n.
https://loggi n g. a p a c h e . o r g /lo g 4j/2.0/ m a n u a l/ a p p e n d e r s . h t m l # S o c k e tA p p e n d e r

In this case the client app e n d e r configu r a t i o n has to be refine d to define SSL par a m e t e r s .
i.e.
appe n d e r . c o m o . s s l. t y p e = SSL
appe n d e r . c o m o . s s l. p r o t o c ol = SSL
appe n d e r . c o m o . s s l. k e y s t o r e . t y p e = K e y S t o r e
appe n d e r . c o m o . s s l. k e y s t o r e .loc a tio n = l o g 4j 2- key s t o r e .j k s
appe n d e r . c o m o . s s l. k e y s t o r e . p a s s w o r d = c h a n g e m e
appe n d e r . c o m o . s s l. tr u s t s t o r e . t y p e = T r u s t S t o r e
appe n d e r . c o m o . s s l. tr u s t s t o r e .lo c a tio n = t r u s t o r e .j k s
appe n d e r . c o m o . s s l. tr u s t s t o r e . p a s s w o r d = c h a n g e m e

10
TAFJ Logging
Log g e r con t e x t
In a multi- tena n t environ m e n t you may want to define a specific logge r cont ext to differ e n t i a t e the logs
from the differ e n t tena n t s. It could also be useful for deb u g gi n g purpo s e wher e a user can define its own
cont ext.
By using prope r t y
- te m e n o s . l o g . c o n t e x t = <YOUR_CO NTEXT_NAME >

you will find your logs unde r :


- <TAFJ_HO M E > / l o g / <YOUR_CO N TEXT_NAM E > : for TAFJ log s

- <TAFJ_HO M E > / l o g _ T 2 4 / <YOUR_CO N TEXT_NAM E > : for T2 4 log s

Sam e feat u r e apply to over ri d d e n log direct o ry as mentio n e d above.


Whe n usi n g a co n t e x t you will also ge n e r a t e a ded i c a t e d file to co nfi g u r e your app e n d e r s :
TAFJTrac e . < Y O U R_CO N T EXT_NAM E > . p r o p e r t i e s fil e.
Like log direc to ri e s prope r t i e s it has to be set at TAFJ star t up, and shoul d be done throu g h environ m e n t
variabl e s or JVM argu m e n t s , refe r to log folder custo miz a ti o n sam pl e above.
Set up throu g h JVM arg u m e n t (apps e rv e r mode):
-Dtem e n o s .log.co n t e x t = c u s t o m L o g C o n t e x t
Set up throu g h environ m e n t varia bl e s (stan d a l o n e mode tafj shell):
- Linux :

o expor t tem e n o s_log_con t e x t = c u s t o m L o g C o n t e x t

- Windows

o set tem e n o s.lo g.c o n t e x t = c u s t o m L o g C o n t e x t

To reve r t this settin g in tafj shell, simply set the prop e r t y to an empty value.
- Linux :

o expor t tem e n o s_log_con t e x t =

- Windows

o set tem e n o s.lo g.c o n t e x t =

Log redir e c t for Spl u n k

To redi r e c t logs into Splunk inst a n c e , we nee d to modify the following prope r t y in tafj.pro p e r t i e s file
o tem n. t afj.r u n ti m e . r e d i r e c t i o n.log g e r =

By default, if the above mentio n e d prop e r t y is empty, logs will be gene r a t e d in filexplor e r .
If the splunk compo n e n t is provide d as the value for the above mentio n e d prop e r t y, logs will get
forwa r d e d to splunk.
ie) tem n. t afj.r u n ti m e . r e d i r e c t i o n.log g e r = s p l u n k

Specify the splunk URL and token using the below mentio n e d two prope r ti e s,

11 Teme n o s Application Fra m e w o r k Java – (TAFJ)


o tem n. t afj.r u n ti m e . r e d i r e c t i o n. s pl u n k . u r l =

o tem n. t afj.r u n ti m e . r e d i r e c t i o n. s pl u n k .t ok e n =

By default, if the above mentio n e d prop e r t i e s are not provide d, the default URL and token use d.
ie) URL = htt p://loc al ho s t : 8 0 8 8
Token = 0fbb0 a 3 1- 4548- 4468- a49b- 64c36 1 b e 3 3 7 6
tCre a t e T r a c e W r i t e r
Once the above prop e r t i e s are define d in tafj.pro p e r t i e s file, user has to exec ut e tCre a t e T r a c e W ri t e r file
which is locat e d inside %TAFJ_HOME%\ bi n direc to ry in orde r to gen e r a t e the new TAFJTrac e . p r o p e r t i e s
file which is comp a ti bl e for Splunk compo n e n t .
The appe n d e r s will modified from Rolling file to HTTP.
ex) appe n d e r .T 2 4. t y p e = http
appe n d e r .T 2 4. n a m e = T24
appe n d e r .T 2 4. u rl = ${def a ul t U rl }
appe n d e r .T 2 4. t ok e n = ${def a ul tTok e n }
appe n d e r .T 2 4.l ayo u t . ty p e = Patt e r n L a y o u t
appe n d e r .T 2 4.l ayo u t . p a t t e r n = ${d efa ul t P a t t e r n }

Mult i- Ten a n t Log g i n g


Log4j2 (the defa ult TAFJ logge r) allows for multi- tena n t logging. Logbac k and Log4j are curr e n tly not
suppo r t e d . When multi- tena n t mode is on (ie, prope r t y tafj.m ul tit e n a n t = t r u e ) , the TAFJTrac e. p r o p e r t i e s
is auto- gen e r a t e d and a routi ng appe n d e r is crea t e d for each logge r. For exa m pl e:
appe n d e r . a pi . ty p e = Routing
appe n d e r . a pi . n a m e = api
appe n d e r . a pi . r o u t e s . t y p e = Rout e s
appe n d e r . a pi . r o u t e s . p a t t e r n = $${c tx:t e n a n t I d }
appe n d e r . a pi . r o u t e s . r o u t e 1 . t y p e = Rout e
appe n d e r . a pi . r o u t e s . r o u t e 1 .fil e.typ e = RollingFile
appe n d e r . a pi . r o u t e s . r o u t e 1 .fil e.n a m e = api
appe n d e r . a pi . r o u t e s . r o u t e 1 .fil e.file N a m e = ${d efa ultLogDi r e c t o ry } / $ { c t x: t e n a n t I d:- }/api.log
appe n d e r . a pi . r o u t e s . r o u t e 1 .fil e.fileP a t t e r n = ${def a ul tLo gDi r e c t o r y }/ $ { c t x: t e n a n t I d :- }/api.log.%i.gz
appe n d e r . a pi . r o u t e s . r o u t e 1 .fil e.layo u t. ty p e = Patt e r nL a yo u t
appe n d e r . a pi . r o u t e s . r o u t e 1 .fil e.layo u t. p a t t e r n = ${d ef a ul t P a t t e r n }
appe n d e r . a pi . r o u t e s . r o u t e 1 .fil e.policie s.ty p e = Policies
appe n d e r . a pi . r o u t e s . r o u t e 1 .fil e.policie s.siz e.ty p e = SizeB as e dT ri g g e r i n g P olicy
appe n d e r . a pi . r o u t e s . r o u t e 1 .fil e.policie s.siz e.siz e = $ { d e f a u l t M a x F il e Siz e }
appe n d e r . a pi . r o u t e s . r o u t e 1 .fil e.st r a t e g y . ty p e = DefaultRollove r S t r a t e g y
appe n d e r . a pi . r o u t e s . r o u t e 1 .fil e.st r a t e g y . mi n = ${def a ul t Mi nB a c k u p I n d e x }
appe n d e r . a pi . r o u t e s . r o u t e 1 .fil e.st r a t e g y . m a x = ${d efa ul t M a xB a c k u p I n d e x }

When a tena n t I d is active, it will be rout e d to the tena n tI d direct o r y und e r defaultLogDi r e c t o r y
(gen e r a lly $TAFJ_HOME/log). For exa m pl e, if Tena n t I d 1 is active, logs for Tena n tI d 1 will appe a r unde r
$TAFJ_HOME/log/Te n a n t I d 1 direct o r y. If no tena n t is active, then logs appe a r nor m a lly in the
defaultLogDir e c t o r y. Likewise, COMO logs to the direct o ry define d by tem e n o s .lo g. di r e c t o r y.co m o

12
TAFJ Logging
(gen e r a lly $TAFJ_HOME/log_T24/ co m o if no tena n t is active). If Tena n t 1 is active, it would log to
$TAFJ_HOME/log_T24/co m o/Te n a n t 1 .

appe n d e r . c o m o . t y p e = Routin g
appe n d e r . c o m o . n a m e = como
appe n d e r . c o m o . r o u t e s . t y p e = Rout e s
appe n d e r . c o m o . r o u t e s . p a t t e r n = $${c tx:COMO- NAME}
appe n d e r . c o m o . r o u t e s . r o u t e 1 . t y p e = Rout e
appe n d e r . c o m o . r o u t e s . r o u t e 1 .file.typ e = File
appe n d e r . c o m o . r o u t e s . r o u t e 1 .file.n a m e = como- ${ctx:COMO- NAME}
appe n d e r . c o m o . r o u t e s . r o u t e 1 .file.fileN a m e = ${sys: t e m e n o s .l og. di r e c t o r y.c o m o } / $ { c t x: t e n a n t I d:- }/$
{ctx:COMO- NAME}
appe n d e r . c o m o . r o u t e s . r o u t e 1 .file.l ayou t .t yp e = Patt e r n L a y o u t
appe n d e r . c o m o . r o u t e s . r o u t e 1 .file.l ayou t . p a t t e r n = %m%n

Det a i l s of Log Type s in TAFJTrac e


The log types used by the TAFJ compo n e n t are listed in the following table,
Log Types

NO LOG TYPES DESCRIPTIO N

All inform a t i o n relat e d to TAFJClient entry point is logge d


1 API in her e.
i.e. calls coming from tCom po n e n t F r a m e w o r k (I F/IRIS) etc.

2 BASIC Anything that is add e d as TRACE in JBC code.

TAFJ Cach e relat e d ent ri e s if in use will be logge d in this


3 CACHE
specific logge r.

4 COHERE NC E Invalid - not in use.

5 COMO TSA age n t s infor m a t i o n will get logge d.

6 COMPILER Logs relat e d to com pila tion com m a n d execu tion.

Star ti n g R17 and above compila tion of JBC should make use
7 COMPON E N T_BUILDER of tCom p o n e n t B uil d e r and all inform a t i o n specific to
compilatio n will be logge d in this specific logge r.

While writing compo n e n t s in JBC, the logge r helps the


8 COMPON E N T_USAGE evolution of compo n e n t iz a ti o n. The call is invoke d from the
function s inside the compo n e n t .

All configu r a t i o n prope r ti e s can be eithe r store d in


prope r ti e s file or at data b a s e level for applica tio n serve r
9 CONFIGURATION
deploym e n t s . The following logge r logs all nece s s a r y
inform a ti o n for prope r t i e s used inside dat a b a s e .

When ev e r acce ssi n g/ m o difying the recor d s availabl e in


10 DATABASE
dat a b a s e will get logge d.

13 Teme n o s Application Fra m e w o r k Java – (TAFJ)


When ev e r acce ssi n g the recor d s availabl e in Read- Only
11 DATABASE_RO
dat a b a s e will get logge d.

12 DBIMPORT Logs relat e d to DBImpo r t com m a n d exec utio n.

13 DBIMPORT_COMPARER Logs relat e d to DBComp a r e r com m a n d exec utio n.

Logs all nece s s a r y infor m a t io n about caller depe n d e n c y


while building depe n d e n c y infor m a t io n whe n invoke d from
14 DEPENDE N CY dep e n d e n c y view inside eclipse unde r tafj plugin. Pleas e
refer to depe n d e n c y section for more inform a ti o n about this
tool.

15 DBTOOLS Logs relat e d to DBTools com m a n d execu tion.

Cont ai n s infor m a t io n about online mess a g e proc e s si n g


16 EJB
specific to busine s s logic, i.e. invoking OBM etc.

17 EXECUTE Anything that is add e d as EXECUTE in JBC code.

18 FILTER Compile r relat e d filters in JBC will be track e d in the logge r.

In conjuction with TAFJ Cache, IGINITE relat e d infor m a t io n


19 IGNITE
is logge d in this specific logge r.

20 ITYPE ITYPE desc ri p t o r s relat e d logs.

21 JQL Transl a tio n of suppo r t e d JQL com m a n d s will get logge d.

22 JQL_NOTSUP P ORTED Transl a tio n of unsu p p o r t e d JQL com m a n d s will get logge d.

23 LOCKING Logs relat e d to Locking mech a ni s m for all locking mode s.

Logs inform a t i o n relat e d to tLockM a n a g e r (PROC) mode


24 LOCKING_SERVER
serve r proc e s s.

Logs inform a t i o n abou t wha t type of logge r is used at


25 LOGGING
sta rt u p , i.e. log4jV1, log4jV2, SL4J, LOGBACK etc.

Cont ai n s infor m a t io n about online and batc h thr e a d s used


26 MDB inside applic a tio n serve r with all relat e d inform a ti o n abou t
the thre a d .

27 PERFOR MANCE Invalid ent ry.

28 PRINTER When ev e r acce ssi n g the print e r s will get logge d.

29 RUNTIME Runti m e session relat e d inform a t i o n will get logge d.

Sanity check tool will prod u c e the logs cont aini n g the
30 SANITYCHECK
applica tio n configu r a t i o n.

31 SELECTLIST Logs inform a t i o n abou t inter n a l select used inside T24.

Logs relat e d to Execut e servle t com m a n d s from the


32 SERVLET
brow se r .

33 SQLTRACE Transl a tio n of SQL com m a n d s will get logge d.

34 T24 Logs will get writt e n while workin g with T24 produ c t .

14
TAFJ Logging
35 TRUN Logs relat e d to tRun com m a n d exec utio n.

Logs inform a t i o n abou t T24 upd a t e s inst all atio n (child


36 UPDATER
inst alle r invoked by par e n t installe r).

Logs all dat a b a s e writes infor m a t io n which are not part of


37 WRITEOUTOFTRAN S
tra n s a c t i o n boun d a r y in T24. Ex: all SEAT relat e d writes.

Cust o m Log g e r
Enable custo m logge r settin g the prop e r t y te m n . t a fj.r u n t i m e . e n a b l e . c u s t o m . l o g g e r = t r u e default its
false.
Define the custo m logge r(co m p o n e n t nam e and level) on <TAFJ_HOME > / c o nf- TAFJTrac e. p r o p e r t i e s as
like othe r com po n e n t (API,T24 etc.)

Ex: AA(cusom logge r)


logge r s = ALERT_AA,DIAGNOSTIC_AA

logge r .ALERT_AA.na m e = ALERT.AA


logge r .ALERT_AA.level = ERROR
logge r .ALERT_AA.additivity = false
logge r .ALERT_AA.app e n d e r R e f s = aa
logge r .ALERT_AA.app e n d e r R e f. a a . r e f = aa

logge r .DIAGNOSTIC_AA.na m e = DIAGNOSTIC.AA


logge r .DIAGNOSTIC_AA.level = ERROR
logge r .DIAGNOSTIC_AA.addi tivity = false
logge r .DIAGNOSTIC_AA.app e n d e r R e f s = aa
logge r .DIAGNOSTIC_AA.app e n d e r R e f. a a . r e f = aa

appe n d e r s = aa

appe n d e r . a a . t y p e = RollingFile
appe n d e r . a a . n a m e = aa
appe n d e r . a a .file N a m e = ${def a ul tLogDi r e c t o r y } / a a .lo g
appe n d e r . a a .file P a t t e r n = ${def a ul tLo gDi r e c t o r y }/ a a .l og.%i.gz
appe n d e r . a a .l ayo u t .t y p e = Patt e r n L a y o u t
appe n d e r . a a .l ayo u t . p a t t e r n = ${def a ul t P a t t e r n }
appe n d e r . a a . p olici e s.ty p e = Policies
appe n d e r . a a . p olici e s.siz e.ty p e = SizeBa s e d T ri g g e r i n g P olicy
appe n d e r . a a . p olici e s.siz e.siz e = $ { d e f a u l t M a x F il e Siz e }
appe n d e r . a a . s t r a t e g y . t y p e = DefaultR ollove r S t r a t e g y
appe n d e r . a a . s t r a t e g y . m i n = ${def a ul t Mi nB a c k u p I n d e x }
appe n d e r . a a . s t r a t e g y . m a x = ${d ef a ult M a xB a c k u p I n d e x }

15 Teme n o s Application Fra m e w o r k Java – (TAFJ)


Trans a c t /JBC level mentio n the co m p o n e n t na m e and log level like below
***Logge r ("Log Compo n e n t " , "Logge r Level(- 1 D E B U G , 0 I N F O , 1 W A R N , 2/ 3/ 4- ERROR)","Logg e r
det ails")***
Logge r ("AA", 3 ,"Erro r Test")
Runtim e will gene r a t e the cust o m log- aa.log unde r <TAFJ_HOME > / l o g

16

You might also like