Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tomcat

...

logs

...

its

...

output

...

in

...

a

...

file

...

called

...

catalina.out.

...

Such

...

file

...

contains

...

the

...

output

...

from

...

the

...

server

...

itself

...

and

...

from

...

all

...

the

...

web

...

applications

...

that

...

don't

...

specify

...

an

...

alternative

...

output

...

file.

...

Different

...

loggers

...

can

...

be

...

used

...

to

...

log

...

web

...

application

...

outputs.

...

The

...

following

...

instructions

...

are

...

for

...

java.util.logging

...

and

...

Log4j

...

.

...

Web

...

Application

...

logging

...

with

...

java.util.logging

...

All

...

you

...

have

...

to

...

do

...

is

...

create

...

a

...

file

...

called

...

logging.properties

...

in

...

WEB-INF/classes

...

with

...

the

...

following

...

content,

...

where

...

you

...

have

...

replaced

...

APPLICATION_OUTPUT_FILE

...

with

...

your

...

choice

...

of

...

output

...

file

...

name

...

(it

...

would

...

be

...

nice

...

to

...

have

...

in

...

it

...

the

...

name

...

of

...

the

...

application

...

that

...

produced

...

the

...

file):

{
Code Block
}
handlers = org.apache.juli.FileHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = APPLICATION_OUTPUT_FILE.
{code}

If

...

you

...

now

...

redeploy

...

your

...

application

...

all

...

the

...

output

...

from

...

your

...

application

...

will

...

be

...

logged

...

in

...

a

...

file

...

called

Code Block

 ${APPLICATION_OUTPUT_FILE}-${date}.log, 

so

...

a

...

file

...

is

...

created

...

each

...

day.

...

There

...

is

...

no

...

way

...

to

...

change

...

this

...

configuration

...

as

...

it

...

is

...

all

...

done

...

internally

...

in

...

tomcat.

...

The

...

advantage

...

of

...

using

...

java.util.logging

...

over

...

log4j

...

is

...

that

...

no

...

additional

...

dependencies

...

are

...

introduced.

...

Redirection

...

stdout

...

and

...

stderr

...

to

...

Logger

...

By

...

default

...

Tomcat

...

will

...

not

...

redirect

...

stdout

...

and

...

stderr

...

to

...

the

...

Logger.

...

This

...

behaviour

...

ca

...

be

...

changed

...

by

...

setting

...

the

...

context

...

parameter

...

swallowOutput

...

to

...

true

...

.

...

This

...

has

...

been

...

done

...

on

...

glast-tomcat02

...

and

...

glast-tomcat03

...

.

...

Monitoring

...

the

...

log

...

file

...

Use

...

probe

...

to

...

monitor

...

the

...

log

...

file

...

produced

...

by

...

your

...

application

...

going

...

to:

{
Code Block
}
http://_serverName_.slac.stanford.edu:8080/probe/logs/
{code}
where _serverName_ is the tomcat server on which the application has been deployed. 

where serverName is the tomcat server on which the application has been deployed.