0

我是新手,面临一个非常奇怪的问题。我做了很多搜索,但找不到解决方案。我实际上是在尝试在我的 riemann 配置文件中定义一个字符串变量。我正在使用下面给出的语法

(streams
  (def mystr "system manager is launching br123 on dir01")
  ;(prn mystr)
  ;(def myfind (re-find #"system manager is launching (\S+) on (\S+)" mystr))
  ;(pr-str myfind)
  ;(pr-str (get myfind 1))
)

每次,我运行 riemann,它都会给我下面的错误 java.lang.String cannot be cast to clojure.lang.IFn

谁能告诉我我做错了什么?

问候

4

1 回答 1

0

define your constants outside the (streams .... ) expression.

the streams macro is trying to run it as if it where a function. I like to define all constants at the top of the config file though that's just personal preference.

于 2015-10-28T22:44:22.837 回答