getsentry / raven-go

Sentry client in Go
https://sentry.io
BSD 3-Clause "New" or "Revised" License
561 stars 148 forks source link

add defaultLoggerName to Client #132

Closed ksophocleous closed 7 years ago

ksophocleous commented 7 years ago

add the ability to set a DefaultLoggerName on the raven client. This default logger name is then set on the packet before Init (but only in case the packet has no Logger name set already)

If the DefaultLoggerName is empty (default), there's no change from the current behaviour.

useful for services that don't want to use the package name as the logger name, it makes more sense to set this once and forget about it.

mattrobenolt commented 7 years ago

Can we expose this as a method to set it? SetDefaultLoggerName(name string) instead. I'm trying to limit the amount of public properties on the Client as possible. Just to avoid things that require locks, etc, and encapsulate this into methods consistently.

ksophocleous commented 7 years ago

yeah good idea, especially since during the read, the client.mu is locked

ksophocleous commented 7 years ago

I will close this pull request in favor of #133