开发者

What does a Scribe log look like?

开发者 https://www.devze.com 2023-01-16 11:50 出处:网络
I\'m having trouble understanding what I can log with Scribe, or even what the log output looks like... Is it a text or binary format? What is the structure of a log message? Time-Message tuples?

I'm having trouble understanding what I can log with Scribe, or even what the log output looks like... Is it a text or binary format? What is the structure of a log message? Time-Message tuples?

Any answers or links to documentation would be greatly appreciated开发者_运维百科 :)


The logging is in a text format, so you can open it with whatever text editor you prefer. I found that when I started to look into Scribe, the documentation was poor so I ended up writing my own for future reference and for the benefit of others.

Firstly, here is detailed instructions for installing Scribe on Linux along with all of the required dependencies:

http://www.alphadevx.com/a/84-Installing-Facebook-Scribe-on-Fedora-8

Secondly, here is an example of how to actually log messages to a running Scribe server using PHP:

http://www.alphadevx.com/a/85-Logging-Messages-to-Scribe-from-PHP

As you can see in the example at the second link, you can basically log whatever string you like to Scribe and it will log it as-is: no timestamp will be prefixed for example.

In Scribe, the tuples are category and message. The category will become the directory name where messages logged to that category will be stored (the individual log files in the directory will also be prefixed with the category name). Hopefully the tutorials above will provide more clarity on this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号