This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Tomcat and the fly likes how to set timestap format in HTMLLayout  in log4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "how to set timestap format in HTMLLayout  in log4j" Watch "how to set timestap format in HTMLLayout  in log4j" New topic
Author

how to set timestap format in HTMLLayout in log4j

rahul_kothari
Greenhorn

Joined: Jul 01, 2005
Posts: 1
dear friends,

i have to set timestamp format in HTMLLayout in log4j. currently it displays time in milliseconds however i want it in my own format(like say yyyy-MM-dd-HH-mm). Can i do that by changing configuration in .properties file,so i mean is there any attribute of HTMLLayout that i can set directly or do i have to do it programatically.
how do i do that . please do reply
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61448
    
  67

"Just_A_Guy",

There aren't may rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: how to set timestap format in HTMLLayout in log4j