Commit Graph

13 Commits

Author SHA1 Message Date
Peter Guy
b625bea201
Doc and README update: Replace all usages of GH discussions with the SG community link. (#64374)
Sourcegraph's GitHub discussions have been defunct for awhile, but links
to them persisted in READMEs and documentation.

## Test plan

Documentation update only.
2024-08-08 13:04:13 -07:00
David Veszelovszki
68ed0abf80
Docs: Replace hyphens in text with em-dashes (#42367) 2023-01-31 13:18:49 +01:00
Robert Lin
b3338d5954
doc/dev: add warnings for common mistakes, update link to trace.Logger (#41384) 2022-09-06 20:56:33 +00:00
Indradhanush Gupta
7d48b11932
doc/dev/how-to/add_logging.md: Fix typo in example (#40796) 2022-08-24 20:34:01 +05:30
GitStart-SourceGraph
624205ffe2
logging(gitstart): migrate internal/database to lib/log (#36466) 2022-06-20 23:04:01 +00:00
Robert Lin
c0a5f3eb3a
doc/dev: raise prominence of logtest.Scoped, make more tweaks (#37282) 2022-06-17 10:44:06 -07:00
Jean-Hadrien Chabran
775d8cc635
doc: explain how logging with Sentry sink works (#37372) 2022-06-17 18:38:16 +02:00
Robert Lin
ec849a4b94
doc/dev: fix header level of traced sub-loggers (#37053) 2022-06-10 15:27:55 -07:00
Robert Lin
3518a54ce8
doc/dev: update logging conventions, align existing usage (#36934)
Outlines some logging conventions based on our recent migration work, and update some existing callsites to align with the new recommendations
2022-06-10 09:38:43 -07:00
Robert Lin
95c6946b9d
lib/log: migrate to github.com/sourcegraph/log (#36834)
This change migrates lib/log to https://github.com/sourcegraph/log in the hopes of easing adoption for other services.
2022-06-08 15:02:38 -07:00
William Bezuidenhout
85cdfdd22a
docs(logging): add lib/log conventions (#36164)
- add conventions to logging doc
- add Sub-Logger section
- add Writing logging messages section
- move some conventions to more relevant sections
2022-05-31 08:46:49 +02:00
Keegan Carruthers-Smith
c79e380ca0
trace: Logger helper (#36139)
I don't see many uses of log.WithTrace, but I think this is because it
is clunky to use since Span or Context may be nil on a context. This
introduces a helper so we can start logging against a span more easily.
Here is an example of using it I want:

  logger := trace.Logger(ctx, s.Log).Scoped("...", "...").With(...

This seems like the best place to add the logger, since we need to use
internal functions in the trace pkg (ie won't work in lib/log).

I updated the documentation to include an example of it. Right now the
documentation has one other place it calls WithTrace, but it needs to be
reworked to be more realistic. I think calling log.Scoped on something
that is traced seems surprising to me.

Test Plan: unused, so just that CI is happy.

Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2022-05-30 11:35:52 +00:00
Robert Lin
9318f183ef
doc/dev: refresh logging, migrate observability to docsite (#34793)
Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
2022-05-04 15:07:14 +00:00