Fork me on GitHub
#duct
<
2018-05-01
>
weavejester13:05:48

@beta1036 You should be able to alter the options in :duct.compiler/cljs. You could also create top-level namespaces for your code, like: foo.client.*, foo.server.* and foo.common.*.

jahson15:05:58

@weavejester Hi! In duct.logger there is argument id which value is (delay (java.util.UUID/randomUUID)). Seems like the purpose of this id is to group log lines by it, but I cannot find anything about its usage, except one test where id is forced using custom appender. Should I write custom appender too to use this id?

weavejester17:05:36

@jahson It depends on your use-case, but having an ID can be useful if your logs are split up by detail. For example, you could have a single log line announcing that there’s been an exception, but provide a full stacktrace somewhere else. There are a few cloud-based logging services that recommend using a dedicated exception tracing service.

weavejester17:05:20

It’s basically an option for you to use if you happen to want it. Since it’s wrapped in a delay, it incurs minimal additional overhead.

jahson17:05:36

So I need to write appender that will force this ID, right?

weavejester17:05:56

Well, it depends - do you want the ID?

jahson17:05:38

There is a case when similar thing would be helpful, it’s when we write logs to logback/kibana. But I just thought that I don’t know if ID will be the same during a request.

weavejester18:05:11

The ID is unique to each log entry

weavejester18:05:34

You can create an ID that’s the same across requests, but you’d need to add your own code for that.

jahson18:05:07

Yeah, now I understand everything much better. Thank you!