Xlog ships with a CLI that includes the core and all official extensions. There are cases where you need custom set of extensions:
Here is how you can build your own custom xlog with features you select.
Create a directory for your custom installation and initialize a go module in it.
1mkdir custom_xlog
2cd custom_xlog
3go mod init github.com/yourusername/custom_xlog
Then create a file xlog.go
for example with the following content
1package main
2
3import (
4 // Core
5 "github.com/emad-elsaid/xlog"
6
7 // All official extensions
8 _ "github.com/emad-elsaid/xlog/extensions/all"
9)
10
11func main() {
12 xlog.Start()
13}
The previous file is what xlog ships in cmd/xlog/xlog.go
if you missed up at any point feel free to go back to it and copy it from there.
If you want to select specific extensions you can replace extensions/all
line with a list of extensions that you want.
All extensions are imported to extensions/all/all.go
. feel free to copy any of them as needed.
You can also import any extensions that you developed at this point.
Now use Go to run your custom installation
1go get github.com/emad-elsaid/xlog
2go run xlog.go