Skip to content

Instantly share code, notes, and snippets.

@tmcneill-reifyhealth
tmcneill-reifyhealth / logback.xml
Created November 7, 2019 12:34
add this to `config/logback.xml` and add `config` to `project.clj` resources
<!-- Logback configuration. See http://logback.qos.ch/manual/index.html -->
<!-- Scanning is currently turned on; This will impact performance! -->
<configuration scan="true" scanPeriod="10 seconds">
<!-- Silence Logback's own status messages about config parsing
<statusListener class="ch.qos.logback.core.status.NopStatusListener" /> -->
<!-- Simple file output -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- encoder defaults to ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
(def spreadsheet-regex
#"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
(defn content-type-spreadsheet? [content-type]
(when content-type
(re-find spreadsheet-regex content-type)))
(defn has-spreadsheet? [msg]
(and (:multipart? msg)
(some content-type-spreadsheet?