看json格式配置、日志的你眼睛不会痛吗?

不痛,不痛,我两只眼睛视力都是1.5000000000000004,才不会痛呐

不痛的朋友,点进来是来围观视力差的网友,这我可以理解,但是我不能理解的是这么好的视力只用来看配置、日志文件,确实很浪费(推一下眼镜

json配置查看工具

让我康康,为啥要用json做配置文件

图中的这款就是它了 github.com/simeji/jid ,俺觉得可以试试用 toml 做配置,至少可以少打好几括号

# This is a TOML document.

title = "TOML Example"

[owner]
name = "Tom Preston-Werner"
dob = 1979-05-27T07:32:00-08:00 # First class dates

[database]
server = "192.168.1.1"
ports = [ 8001, 8001, 8002 ]
connection_max = 5000
enabled = true

[servers]

  # Indentation (tabs and/or spaces) is allowed but not required
  [servers.alpha]
  ip = "10.0.0.1"
  dc = "eqdc10"

  [servers.beta]
  ip = "10.0.0.2"
  dc = "eqdc10"

[clients]
data = [ ["gamma", "delta"], [1, 2] ]

# Line breaks are OK when inside arrays
hosts = [
  "alpha",
  "omega"
]

了解更多,戳 =》github.com/toml-lang/toml

json日志查看利器

爱护视力从现在做起

github.com/globocom/prettylog 官方提供的安装脚本可能会出错,golang开发者就得自行编译了。

你可能感兴趣的:(看json格式配置、日志的你眼睛不会痛吗?)