我正在尝试设置memcached日志记录,这样我就可以跟踪我的rails应用程序缓存中的读/写。
在使用mac osx进行开发时,我使用homebrew安装了memcached,并使用Launchy启动了它。
我的启动文件如下所示(homebrew.mxcl.memcached.plist):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.memcached</string>
<key>KeepAlive</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/memcached/bin/memcached</string>
<string>-vv</string>
<string>localhost</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>/usr/local</string>
<key>StandardOutPath</key>
<string>/usr/local/opt/memcached/logs/memcached.log</string>
<key>StandardErrorPath</key>
<string>/usr/local/opt/memcached/logs/memcached.log</string>
</dict>
</plist>但是,无论我在启动时包含多少详细标志,输出都是相同的,我使用this web作为不同日志级别的资源。
我是这样开始的:
lunchy start memcached当我跟踪日志时,这是我得到的,不是很有用:
tail -f /usr/local/opt/memcached/logs/memcached.log
<19 send buffer was 9216, now 7456540
<23 send buffer was 9216, now 7456540
<19 server listening (udp)
<22 server listening (udp)
<23 server listening (udp)
<20 server listening (udp)
<21 server listening (udp)
<26 server listening (udp)
<24 server listening (udp)
<25 server listening (udp)任何人都有设置它的经验,我这里遗漏了什么?
发布于 2015-06-09 05:41:55
最大冗长级别是-vvv (每个'v‘都会增加冗长级别)。您当前的级别是-vv,因此有增加到最大值的空间。
发布于 2015-09-15 05:20:21
发布的输出表明没有任何内容与memcached通信--这是标准的启动日志信息。一旦有东西开始与memcached对话,您应该会看到类似这样的代码行:
authenticated() in cmd 0x00 is true
<38 GET 16674752-73e0-46d4-b5a7-acc2a2e34834
>38 Writing bin response:
>38 0x81 0x00 0x00 0x00
>38 0x04 0x00 0x00 0x00
>38 0x00 0x00 0x0b 0xb8
>38 0x00 0x22 0x3f 0xff
>38 0x00 0x00 0x00 0x00
>38 0x00 0x00 0x00 0x00
<38 Read binary protocol data:
<38 0x80 0x01 0x00 0x24
<38 0x08 0x00 0x00 0x00
<38 0x00 0x00 0x0c 0x4e
<38 0x00 0x22 0x40 0x01
<38 0x00 0x00 0x00 0x00
<38 0x00 0x00 0x00 0x00https://stackoverflow.com/questions/30602941
复制相似问题