func (log *Log) Add(g *Graph) int64 {
	b := g.Binary()
	if b == nil {
		return 0
	}
	i, _ := log.f.Seek(0, 2)
	log.f.Write(b)
	if log.autoSync {
		log.f.Sync()
	}
	return i
}
Add adds an OGDL object to the log. The starting position into the log
is returned.
package ogdl
import "os"
type Log struct {
	f        *os.File
	autoSync bool
}
func OpenLog(file string) (*Log, error) {
	f, err := os.OpenFile(file, os.O_RDWR|os.O_CREATE, 0666)
	if err != nil {
		return nil, err
	}
	log := Log{f, true}
	return &log, nil
}
func (log *Log) Close() {
	log.f.Close()
}
func (log *Log) Sync() {
	log.f.Sync()
}