1

I have the following code.

   (timbre/merge-config! {:timestamp-pattern "yyyy/MM/dd HH:mm:ss ZZ" } )
 (info (str "acm template deploy start..., the version is " version))

But the timestamp format is not I want. How should I set the format?

 $ lein run
Compiling com.rockiedata.dw.acm.template.deploy
15-Jun-25 22:13:00 UnknownHost INFO [com.rockiedata.dw.acm.template.deploy] - acm template deploy start..., the version is 0.1

And also how to set local, in the document it said

  :timestamp-locale  nil

But how to set a Chinese local?

Stéphane Bruckert
  • 21,706
  • 14
  • 92
  • 130
Daniel Wu
  • 5,853
  • 12
  • 42
  • 93

1 Answers1

4

Based on the documentation https://github.com/ptaoussanis/timbre you should do following :

(timbre/merge-config! 
  {:timestamp-opts 
    {:pattern "yyyy/MM/dd HH:mm:ss ZZ" 
     :locale (java.util.Locale. "zh_CN")}})
Viktor K.
  • 2,670
  • 2
  • 19
  • 30