loggingscribe-server

What does a Scribe log look like?


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 :)


Solution

  • 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.