• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set timestap format in HTMLLayout in log4j

 
rahul_kothari
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64964
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic