浏览代码

add per-module per-function trace example

pull/246/head
Luis Rascao 10 年前
父节点
当前提交
474516c95d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      README.md

+ 2
- 2
README.md 查看文件

@ -348,10 +348,10 @@ a wildcard to match any message that has that attribute, regardless of its
value. value.
Tracing to an existing logfile is also supported, if you wanted to log Tracing to an existing logfile is also supported, if you wanted to log
warnings from a particular module to the default error.log:
warnings from a particular function in a particular module to the default error.log:
```erlang ```erlang
lager:trace_file("log/error.log", [{module, mymodule}], warning)
lager:trace_file("log/error.log", [{module, mymodule}, {function, myfunction}], warning)
``` ```
To view the active log backends and traces, you can use the lager:status() To view the active log backends and traces, you can use the lager:status()

正在加载...
取消
保存