From 88d5182868c964714448d93977b4c986021b3ab7 Mon Sep 17 00:00:00 2001 From: David Muir Sharnoff Date: Tue, 26 Jul 2022 22:37:34 -0700 Subject: [PATCH] rename xoplog -> xop --- base.go | 6 +++--- basegroup.go | 8 ++++---- basegroup.zzzgo | 8 ++++---- config.go | 2 +- context.go | 2 +- go.mod | 7 +++---- go.sum | 33 ------------------------------ logger.go | 8 ++++---- rest/middleware.go | 18 ++++++++-------- rest/request.go | 12 +++++------ seed.go | 8 ++++---- seed.zzzgo | 8 ++++---- span.go | 6 +++--- span.zzzgo | 6 +++--- support.go | 2 +- support_test.go | 2 +- xopbase/base.go | 6 +++--- xopbase/base.zzzgo | 6 +++--- xopbase/xopjson/jsonlogger.go | 10 ++++----- xopbase/xopjson/jsonlogger.zzzgo | 8 ++++---- xopbase/xoptest/testlogger.go | 14 ++++++------- xopbase/xoptest/testlogger.zzzgo | 14 ++++++------- xopbase/xoptest/testlogger_test.go | 8 ++++---- xopbytes/bytelogger.go | 2 +- xopconst/attributes.go | 2 +- xopconst/attributes.zzzgo | 2 +- xopconst/enum.go | 4 ++-- xopprop/utils.go | 2 +- xoputil/attribute_builder.go | 4 ++-- xoputil/attribute_builder.zzzgo | 4 ++-- 30 files changed, 94 insertions(+), 128 deletions(-) diff --git a/base.go b/base.go index 3279ec77..651abc04 100644 --- a/base.go +++ b/base.go @@ -1,8 +1,8 @@ -package xoplog +package xop import ( - "github.com/muir/xoplog/xopbase" - "github.com/muir/xoplog/xopconst" + "github.com/muir/xop/xopbase" + "github.com/muir/xop/xopconst" ) type loggers struct { diff --git a/basegroup.go b/basegroup.go index 4116795f..5ae3b389 100644 --- a/basegroup.go +++ b/basegroup.go @@ -1,14 +1,14 @@ // This file is generated, DO NOT EDIT. It comes from the corresponding .zzzgo file -package xoplog +package xop import ( "sync" "time" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopbase" - "github.com/muir/xoplog/xopconst" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopbase" + "github.com/muir/xop/xopconst" ) type ( diff --git a/basegroup.zzzgo b/basegroup.zzzgo index 6e559a48..a5d90c74 100644 --- a/basegroup.zzzgo +++ b/basegroup.zzzgo @@ -1,12 +1,12 @@ -package xoplog +package xop import ( "sync" "time" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopbase" - "github.com/muir/xoplog/xopconst" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopbase" + "github.com/muir/xop/xopconst" ) type baseLoggers []xopbase.Logger diff --git a/config.go b/config.go index 87e3da54..bc265cbb 100644 --- a/config.go +++ b/config.go @@ -1,4 +1,4 @@ -package xoplog +package xop import ( golog "log" diff --git a/context.go b/context.go index e63c99b2..9e11529b 100644 --- a/context.go +++ b/context.go @@ -1,4 +1,4 @@ -package xoplog +package xop import ( "context" diff --git a/go.mod b/go.mod index fda05204..9ce28ce3 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,14 @@ -module github.com/muir/xoplog +module github.com/muir/xop go 1.16 replace github.com/muir/rest v0.0.0 => ../rest require ( - github.com/dmarkham/enumer v1.5.5 - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 github.com/muir/rest v0.0.0 - github.com/phuslu/fasttime v1.0.0 // indirect + github.com/phuslu/fasttime v1.0.0 github.com/stretchr/testify v1.8.0 ) diff --git a/go.sum b/go.sum index ab05caf9..d73e3edc 100644 --- a/go.sum +++ b/go.sum @@ -1,16 +1,12 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dmarkham/enumer v1.5.5 h1:LpOGL3PQTPOM87rgowZEf7Z5EmkgnKqUtS92Vo+vqzs= -github.com/dmarkham/enumer v1.5.5/go.mod h1:qHwULwuCxYFAFM5KCkpF1U/U0BF5sNQKLccvUzKNY2w= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/pascaldekloe/name v1.0.0 h1:n7LKFgHixETzxpRv2R77YgPUFo85QHGZKrdaYm7eY5U= -github.com/pascaldekloe/name v1.0.0/go.mod h1:Z//MfYJnH4jVpQ9wkclwu2I2MkHmXTlT9wR5UZScttM= github.com/phuslu/fasttime v1.0.0 h1:SUkNta9tJLy54glGb/Z4+/NJ7aXiLogVuSPEXAya6i8= github.com/phuslu/fasttime v1.0.0/go.mod h1:1zflhZFowg3RSL0IpmWQ0AprKCKbTRKV9PEpVXDBZ7A= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -22,35 +18,6 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/logger.go b/logger.go index 5e755e1c..e45ea864 100644 --- a/logger.go +++ b/logger.go @@ -1,4 +1,4 @@ -package xoplog +package xop import ( "fmt" @@ -8,9 +8,9 @@ import ( "sync/atomic" "time" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopbase" - "github.com/muir/xoplog/xopconst" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopbase" + "github.com/muir/xop/xopconst" "github.com/mohae/deepcopy" ) diff --git a/rest/middleware.go b/rest/middleware.go index 75593f66..dca7e06d 100644 --- a/rest/middleware.go +++ b/rest/middleware.go @@ -4,13 +4,13 @@ import ( "net/http" "github.com/gorilla/mux" - "github.com/muir/xoplog" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopconst" - "github.com/muir/xoplog/xopprop" + "github.com/muir/xop" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopconst" + "github.com/muir/xop/xopprop" ) -func makeChildSpan(parent xoplog.Log, r *http.Request) *xoplog.Log { +func makeChildSpan(parent xop.Log, r *http.Request) *xop.Log { route := mux.CurrentRoute(r) name := route.GetName() if name == "" { @@ -45,14 +45,14 @@ func makeChildSpan(parent xoplog.Log, r *http.Request) *xoplog.Log { bundle.Trace.SpanID().SetRandom() } - log := parent.Span().Seed(xoplog.WithBundle(bundle)).Request(r.Method + " " + name) + log := parent.Span().Seed(xop.WithBundle(bundle)).Request(r.Method + " " + name) log.Span().Enum(xopconst.SpanKind, xopconst.SpanKindClient) log.Span().EmbeddedEnum(xopconst.SpanTypeHTTPClientRequest) log.Span().Str(xopconst.URL, r.URL.String()) return log } -func ParentLogMiddleware(parentLog xoplog.Log) func(http.HandlerFunc) http.HandlerFunc { +func ParentLogMiddleware(parentLog xop.Log) func(http.HandlerFunc) http.HandlerFunc { return func(next http.HandlerFunc) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { ctx := r.Context() @@ -65,8 +65,8 @@ func ParentLogMiddleware(parentLog xoplog.Log) func(http.HandlerFunc) http.Handl } // MakeLogInjector is compatible with https://github.com/muir/nject/nvelope -func MakeLogInjector(parentLog xoplog.Log) func(func(*xoplog.Log), *http.Request) { - return func(inner func(*xoplog.Log), r *http.Request) { +func MakeLogInjector(parentLog xop.Log) func(func(*xop.Log), *http.Request) { + return func(inner func(*xop.Log), r *http.Request) { log := makeChildSpan(parentLog, r) defer log.Done() inner(log) diff --git a/rest/request.go b/rest/request.go index ce133c18..bbf50e29 100644 --- a/rest/request.go +++ b/rest/request.go @@ -5,9 +5,9 @@ import ( "net/http" "github.com/muir/rest" - "github.com/muir/xoplog" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopconst" + "github.com/muir/xop" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopconst" ) var ( @@ -18,8 +18,8 @@ var ( xopconst.URL.Key()) ) -func Log(log xoplog.Log) *rest.RequestOpts { - var step *xoplog.Log +func Log(log xop.Log) *rest.RequestOpts { + var step *xop.Log var farSideSpan trace.HexBytes8 return rest.Make(). DoBefore(func(o *rest.RequestOpts, r *http.Request) error { @@ -46,7 +46,7 @@ func Log(log xoplog.Log) *rest.RequestOpts { return nil }). DoAfter(func(result rest.Result) rest.Result { - var line *xoplog.LogLine + var line *xop.LogLine if result.Error != nil { line = step.Error() } else { diff --git a/seed.go b/seed.go index bfea62fd..5f53711e 100644 --- a/seed.go +++ b/seed.go @@ -1,13 +1,13 @@ // This file is generated, DO NOT EDIT. It comes from the corresponding .zzzgo file -package xoplog +package xop import ( "time" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopbase" - "github.com/muir/xoplog/xopconst" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopbase" + "github.com/muir/xop/xopconst" ) // Seed is used to create a Log. diff --git a/seed.zzzgo b/seed.zzzgo index 092f065b..10e0f41c 100644 --- a/seed.zzzgo +++ b/seed.zzzgo @@ -1,11 +1,11 @@ -package xoplog +package xop import ( "time" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopbase" - "github.com/muir/xoplog/xopconst" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopbase" + "github.com/muir/xop/xopconst" ) // Seed is used to create a Log. diff --git a/span.go b/span.go index 86ed7a15..954aa261 100644 --- a/span.go +++ b/span.go @@ -1,12 +1,12 @@ // This file is generated, DO NOT EDIT. It comes from the corresponding .zzzgo file -package xoplog +package xop import ( "time" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopconst" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopconst" "github.com/mohae/deepcopy" ) diff --git a/span.zzzgo b/span.zzzgo index f1ed632d..94a40864 100644 --- a/span.zzzgo +++ b/span.zzzgo @@ -1,8 +1,8 @@ -package xoplog +package xop import ( - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopconst" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopconst" "github.com/mohae/deepcopy" ) diff --git a/support.go b/support.go index 6eec022e..a35fb067 100644 --- a/support.go +++ b/support.go @@ -1,4 +1,4 @@ -package xoplog +package xop import ( "strconv" diff --git a/support_test.go b/support_test.go index 875aa90c..37526f01 100644 --- a/support_test.go +++ b/support_test.go @@ -1,4 +1,4 @@ -package xoplog +package xop import ( "testing" diff --git a/xopbase/base.go b/xopbase/base.go index ec420690..e7bf4b31 100644 --- a/xopbase/base.go +++ b/xopbase/base.go @@ -5,8 +5,8 @@ package xopbase import ( "time" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopconst" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopconst" ) // Logger is the bottom half of a logger -- the part that actually @@ -28,7 +28,7 @@ type Logger interface { // ReferencesKept should return true if Any() objects are not immediately // serialized (the object is kept around and serilized later). If copies - // are kept, then xoplog.Log will make copies. + // are kept, then xop.Log will make copies. ReferencesKept() bool // Buffered should return true if the logger buffers output and sends diff --git a/xopbase/base.zzzgo b/xopbase/base.zzzgo index b84d20f9..e6c47a4f 100644 --- a/xopbase/base.zzzgo +++ b/xopbase/base.zzzgo @@ -3,8 +3,8 @@ package xopbase import ( "time" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopconst" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopconst" ) // Logger is the bottom half of a logger -- the part that actually @@ -26,7 +26,7 @@ type Logger interface { // ReferencesKept should return true if Any() objects are not immediately // serialized (the object is kept around and serilized later). If copies - // are kept, then xoplog.Log will make copies. + // are kept, then xop.Log will make copies. ReferencesKept() bool // Buffered should return true if the logger buffers output and sends diff --git a/xopbase/xopjson/jsonlogger.go b/xopbase/xopjson/jsonlogger.go index 2d952f39..81ba5690 100644 --- a/xopbase/xopjson/jsonlogger.go +++ b/xopbase/xopjson/jsonlogger.go @@ -9,11 +9,11 @@ import ( "sync/atomic" "time" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopbase" - "github.com/muir/xoplog/xopbytes" - "github.com/muir/xoplog/xopconst" - "github.com/muir/xoplog/xoputil" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopbase" + "github.com/muir/xop/xopbytes" + "github.com/muir/xop/xopconst" + "github.com/muir/xop/xoputil" "github.com/google/uuid" "github.com/phuslu/fasttime" diff --git a/xopbase/xopjson/jsonlogger.zzzgo b/xopbase/xopjson/jsonlogger.zzzgo index 5c8c873b..f1ad0c00 100644 --- a/xopbase/xopjson/jsonlogger.zzzgo +++ b/xopbase/xopjson/jsonlogger.zzzgo @@ -7,10 +7,10 @@ import ( "sync/atomic" "time" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopbase" - "github.com/muir/xoplog/xopconst" - "github.com/muir/xoplog/xoputil" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopbase" + "github.com/muir/xop/xopconst" + "github.com/muir/xop/xoputil" "github.com/google/uuid" "github.com/phuslu/fasttime" diff --git a/xopbase/xoptest/testlogger.go b/xopbase/xoptest/testlogger.go index 85c50a9b..f0038d04 100644 --- a/xopbase/xoptest/testlogger.go +++ b/xopbase/xoptest/testlogger.go @@ -11,11 +11,11 @@ import ( "time" "github.com/google/uuid" - "github.com/muir/xoplog" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopbase" - "github.com/muir/xoplog/xopconst" - "github.com/muir/xoplog/xoputil" + "github.com/muir/xop" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopbase" + "github.com/muir/xop/xopconst" + "github.com/muir/xop/xoputil" ) type testingT interface { @@ -81,8 +81,8 @@ type Line struct { kvText []string } -func (l *TestLogger) WithMe() xoplog.SeedModifier { - return xoplog.WithBaseLogger("testing", l) +func (l *TestLogger) WithMe() xop.SeedModifier { + return xop.WithBaseLogger("testing", l) } func (l *TestLogger) ID() string { return l.id } diff --git a/xopbase/xoptest/testlogger.zzzgo b/xopbase/xoptest/testlogger.zzzgo index 207a1e26..d6300798 100644 --- a/xopbase/xoptest/testlogger.zzzgo +++ b/xopbase/xoptest/testlogger.zzzgo @@ -9,11 +9,11 @@ import ( "time" "github.com/google/uuid" - "github.com/muir/xoplog" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopbase" - "github.com/muir/xoplog/xopconst" - "github.com/muir/xoplog/xoputil" + "github.com/muir/xop" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopbase" + "github.com/muir/xop/xopconst" + "github.com/muir/xop/xoputil" ) type testingT interface { @@ -77,8 +77,8 @@ type Line struct { kvText []string } -func (l *TestLogger) WithMe() xoplog.SeedModifier { - return xoplog.WithBaseLogger("testing", l) +func (l *TestLogger) WithMe() xop.SeedModifier { + return xop.WithBaseLogger("testing", l) } func (l *TestLogger) ID() string { return l.id } diff --git a/xopbase/xoptest/testlogger_test.go b/xopbase/xoptest/testlogger_test.go index 59af1b87..00fd974b 100644 --- a/xopbase/xoptest/testlogger_test.go +++ b/xopbase/xoptest/testlogger_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/muir/xoplog" - "github.com/muir/xoplog/xopbase/xoptest" - "github.com/muir/xoplog/xopconst" + "github.com/muir/xop" + "github.com/muir/xop/xopbase/xoptest" + "github.com/muir/xop/xopconst" "github.com/stretchr/testify/assert" ) @@ -14,7 +14,7 @@ import ( func TestLogMethods(t *testing.T) { start := time.Now() tlog := xoptest.New(t) - log := xoplog.NewSeed(tlog.WithMe()).Request(t.Name()) + log := xop.NewSeed(tlog.WithMe()).Request(t.Name()) log.Info().Msg("basic info message") log.Error().Msg("basic error message") log.Alert().Msg("basic alert message") diff --git a/xopbytes/bytelogger.go b/xopbytes/bytelogger.go index 0726b8ea..48eee475 100644 --- a/xopbytes/bytelogger.go +++ b/xopbytes/bytelogger.go @@ -1,7 +1,7 @@ package xopbytes import ( - "github.com/muir/xoplog/trace" + "github.com/muir/xop/trace" ) type BytesWriter interface { diff --git a/xopconst/attributes.go b/xopconst/attributes.go index f3993976..8ed73141 100644 --- a/xopconst/attributes.go +++ b/xopconst/attributes.go @@ -10,7 +10,7 @@ import ( "sync" "time" - "github.com/muir/xoplog/trace" + "github.com/muir/xop/trace" ) // TODO: PERFORMANCE: pre-allocate blocks of 128 Attributes to provide better locality of reference when using these diff --git a/xopconst/attributes.zzzgo b/xopconst/attributes.zzzgo index af1e3cf9..317e23f9 100644 --- a/xopconst/attributes.zzzgo +++ b/xopconst/attributes.zzzgo @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/muir/xoplog/trace" + "github.com/muir/xop/trace" ) // TODO: PERFORMANCE: pre-allocate blocks of 128 Attributes to provide better locality of reference when using these diff --git a/xopconst/enum.go b/xopconst/enum.go index 9b75c8a5..55f49aa7 100644 --- a/xopconst/enum.go +++ b/xopconst/enum.go @@ -12,13 +12,13 @@ type EnumAttribute struct{ Attribute } // EmbeddedEnumAttribute is a type of enum set that can be added // onto from multiple places. For example, SpanType is a -// IotaEnumAttribute and consumers of the xoplog can add additional +// IotaEnumAttribute and consumers of the xop can add additional // values to the enum. Values must be kept distinct. type EmbeddedEnumAttribute struct{ EnumAttribute } // IotaEnumAttribute is a type of enum set that can be added // onto from multiple places. For example, SpanType is a -// IotaEnumAttribute and consumers of the xoplog can add additional +// IotaEnumAttribute and consumers of the xop can add additional // values to the enum. Values are automatically kept distinct. type IotaEnumAttribute struct { EnumAttribute diff --git a/xopprop/utils.go b/xopprop/utils.go index 6498fecc..3b5e2ae0 100644 --- a/xopprop/utils.go +++ b/xopprop/utils.go @@ -3,7 +3,7 @@ package xopprop import ( "strings" - "github.com/muir/xoplog/trace" + "github.com/muir/xop/trace" ) // "traceparent" header diff --git a/xoputil/attribute_builder.go b/xoputil/attribute_builder.go index 8abb35b2..537541e9 100644 --- a/xoputil/attribute_builder.go +++ b/xoputil/attribute_builder.go @@ -5,8 +5,8 @@ package xoputil import ( "time" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopconst" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopconst" ) func (a *AttributeBuilder) MetadataAny(k *xopconst.AnyAttribute, v interface{}) { diff --git a/xoputil/attribute_builder.zzzgo b/xoputil/attribute_builder.zzzgo index 39f630b8..96f044d8 100644 --- a/xoputil/attribute_builder.zzzgo +++ b/xoputil/attribute_builder.zzzgo @@ -3,8 +3,8 @@ package xoputil import ( "time" - "github.com/muir/xoplog/trace" - "github.com/muir/xoplog/xopconst" + "github.com/muir/xop/trace" + "github.com/muir/xop/xopconst" ) func (a *AttributeBuilder) MetadataAny(k *xopconst.AnyAttribute, v interface{}) {