| 172 | } |
| 173 | |
| 174 | func logUpdate(schema *pb.SchemaUpdate, pred string) string { |
| 175 | if schema == nil { |
| 176 | return "" |
| 177 | } |
| 178 | |
| 179 | typ := types.TypeID(schema.ValueType).Name() |
| 180 | if schema.List { |
| 181 | typ = fmt.Sprintf("[%s]", typ) |
| 182 | } |
| 183 | return fmt.Sprintf("Setting schema for attr %s: %v, tokenizer: %v, directive: %v, count: %v\n", |
| 184 | pred, typ, schema.Tokenizer, schema.Directive, schema.Count) |
| 185 | } |
| 186 | |
| 187 | func logTypeUpdate(typ *pb.TypeUpdate, typeName string) string { |
| 188 | return fmt.Sprintf("Setting type definition for type %s: %v\n", typeName, typ) |