PageSourceSearch

https://openfeature.dev/assets/js/3cfb41c1.019fedf7.js

js openfeature.dev collected 2026-09-24 08:39:47 UTC 3,857 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkdocs||=[]).push([[5664],{73582(e,o,t){t.r(o),t.d(o,{default:()=>s,metadata:()=>n});var n=t(49714),r=t(74848),i=t(28453);const g={slug:"configuring-a-logger-for-the-go-sdk",title:"Configuring a logger for the go-sdk",authors:["skyerus"],date:new Date("2022-09-02T00:00:00.000Z"),tags:["golang","blog","tutorial","go-sdk","hooks","logging","logger"],draft:!1},a={authorsImageUrls:[void 0]};function l(e){const o={a:"a",code:"code",em:"em",p:"p",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.p,{children:(0,r.jsx)(o.em,{children:"Logging is the act of keeping a log. A log (in this case) records events that occur in software."})}),"\n",(0,r.jsxs)(o.p,{children:["Subject to many opinions and differing principles of best practice, the best thing we could do for the ",(0,r.jsx)(o.code,{children:"go-sdk"})," was\nto create an implementation as open & configurable as possible. To achieve this, we've integrated ",(0,r.jsx)(o.a,{href:"https://github.com/go-logr/logr",children:"logr"}),",\nthis allows the use of any logger that conforms to its API."]}),"\n",(0,r.jsxs)(o.p,{children:["Applications may already have a chosen logging solution at the point of introducing ",(0,r.jsx)(o.code,{children:"openfeature"}),". An ",(0,r.jsx)(o.a,{href:"https://github.com/go-logr/logr#implementations-non-exhaustive",children:"integration with logr"}),"\nmay already exist for their chosen solution (integrations exist for many of the popular logger packages in go). If not, they could write their own integration."]})]})}function s(e={}){const{wrapper:o}={...(0,i.R)(),...e.components};return o?(0,r.jsx)(o,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}t.d(o,["assets",0,a,"contentTitle",0,undefined,"frontMatter",0,g,"toc",0,[]])},28453(e,o,t){t.d(o,{R:()=>g,x:()=>a});var n=t(96540);const r={},i=n.createContext(r);function g(e){const o=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function a(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:g(e.components),n.createElement(i.Provider,{value:o},e.children)}},49714(e){e.exports=JSON.parse('{"permalink":"/blog/configuring-a-logger-for-the-go-sdk","editUrl":"https://github.com/open-feature/openfeature.dev/edit/main/blog/2022-09-02-configuring-a-logger-for-the-go-sdk.md","source":"@site/blog/2022-09-02-configuring-a-logger-for-the-go-sdk.md","title":"Configuring a logger for the go-sdk","description":"Logging is the act of keeping a log. A log (in this case) records events that occur in software.","date":"2022-09-02T00:00:00.000Z","tags":[{"inline":true,"label":"golang","permalink":"/blog/tags/golang"},{"inline":true,"label":"blog","permalink":"/blog/tags/blog"},{"inline":true,"label":"tutorial","permalink":"/blog/tags/tutorial"},{"inline":true,"label":"go-sdk","permalink":"/blog/tags/go-sdk"},{"inline":true,"label":"hooks","permalink":"/blog/tags/hooks"},{"inline":true,"label":"logging","permalink":"/blog/tags/logging"},{"inline":true,"label":"logger","permalink":"/blog/tags/logger"}],"readingTime":2.4,"hasTruncateMarker":true,"authors":[{"name":"Skye Gill","title":"Software Engineer at NET Reply, OpenFeature contributor","url":"https://github.com/skyerus","imageURL":"https://github.com/skyerus.png","key":"skyerus","page":null}],"frontMatter":{"slug":"configuring-a-logger-for-the-go-sdk","title":"Configuring a logger for the go-sdk","authors":["skyerus"],"date":"2022-09-02T00:00:00.000Z","tags":["golang","blog","tutorial","go-sdk","hooks","logging","logger"],"draft":false},"unlisted":false,"prevItem":{"title":"Specification hardening and 1.0 SDKs","permalink":"/blog/hardening-and-1-0-sdks"},"nextItem":{"title":"Creating a Provider for the go-sdk","permalink":"/blog/creating-a-provider-for-the-go-sdk"}}')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.