timbre

bja 2017-07-24T20:34:04.527116Z

@danboykis you could write basically an identical appender with a different predicate check (checking the file's size): https://github.com/ptaoussanis/timbre/blob/master/src/taoensso/timbre/appenders/3rd_party/rolling.clj#L67

2017-07-24T20:34:58.555871Z

@bja thanks, i figured i'll have to write my own

bja 2017-07-24T20:35:16.565072Z

basically you just change the predicate in that file

bja 2017-07-24T20:35:38.576325Z

I think on a java.io.File you can call .length()

bja 2017-07-24T20:35:44.579750Z

and just test that against whatever size

bja 2017-07-24T20:36:03.589614Z

you probably have to name stuff a little differently

bja 2017-07-24T20:36:10.593181Z

so that your log file knows which filename to write to

bja 2017-07-24T20:36:38.608019Z

since that appender kinda assumes it can construct a log file name based on timestamp

2017-07-24T20:36:54.616253Z

well the timestamp isn't a bad idea to roll even with size

2017-07-24T20:37:12.624943Z

makes sense to order them pieces somehow

2017-07-24T20:37:21.629949Z

might as well order the log pieces by time

bja 2017-07-24T20:37:54.647104Z

but what I mean is, when you roll, you need to either rename/move the old files and use a constant name or pick a new name

bja 2017-07-24T20:38:43.672178Z

I usually specify this stuff via syslog

bja 2017-07-24T20:39:14.688549Z

and just write to stdout and let the supervisor process for my jvm deal with sending to syslog

2017-07-24T20:40:06.715223Z

i am not sure if we're talking about the same thing or not

2017-07-24T20:41:06.746277Z

if I have foo.log the moment foo.log reaches 1gb I'll rename it to something like foo-yyyymmddss.log

2017-07-24T20:41:23.755244Z

i think that makes sense to do

bja 2017-07-24T20:41:28.757651Z

ah

bja 2017-07-24T20:41:39.763230Z

that's reasonable

2017-07-24T20:41:49.768746Z

that's what I meant by pieces

bja 2017-07-24T20:42:05.777020Z

(that's the first of the two options I mentioned "rename/move the old files and use a constant name")

2017-07-24T20:42:10.779432Z

yeah

2017-07-24T20:42:28.788167Z

i think syslog is great, but the place where i work (java shop) everyone rolls with logback/log4j

2017-07-24T20:42:45.796691Z

so I am trying to not rock the boat too much