Fork me on GitHub

@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.*.


@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?


@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.


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.


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


Well, it depends - do you want the ID?


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.


The ID is unique to each log entry


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


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