package
2.0.2
Repository: https://github.com/adapptor/service.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author
ContainsUserProperty checks if a UserProperty value exists in an array of UserProperty.
GetLogger Get the LogLevel that matches the given log level string.
Convenience function to get the minimum log level for all current log sinks.
GetSentryLevel Get the Sentry severity level correspodning to the given LogLevel.
GetUserPropertiesMap returns the user properties map from the given context, or nil if no user properties are found.
GetUserPropertiesString returns a string that contains comma-separated user properties that are specified in the given context and userPropertiesToLog slice.
Convenience function to get the user properties to log for all current log sinks Note: Log sinks added after the most recent call of SetUserPropertiesToLog can have different values.
No description provided by the author
Write the given JSON object to the standard log Deprecated: use Log instead.
No description provided by the author
No description provided by the author
Log the contents of a reader.
No description provided by the author
Create a new log set, with the standard logger.
NewSentryLogger creates a new Sentry logger dsn: Sentry DSN debug: whether to log Sentry SDK debug messages environment: the service environment (e.g., dev, staging, production) release: the service release version (e.g., v1.2.3) tags: custom tags to add to all events (e.g., "service" => "acme api") minimumLevel: minimum log level userPropertiesToLog: user properties to log (e.g., userId, email).
No description provided by the author
No description provided by the author
Convenience function to set the minimum log level for all current log sinks.
Add a file logger with the given file name Deprecated: use NewFileLogger instead.
Convenience function to set the user properties to log for all current log sinks.

# Constants

No description provided by the author
No description provided by the author
Error-level logs indicate errors that should be investigated.
Fatal-level logs indicate errors that terminated the service and should be investigated.
Info-level logs indicate normal service lifecycle events, 'valuable' events for audit, etc.
No description provided by the author
Key for the map of all user properties added to a context.
Key for user email added to the context in the user properties map.
Key for user id added to the context in the user properties map.
Key for user name added to the context in the user properties map.
Warning-level logs indicate events that are unexpected but tolerable, which may need further investigation.

# Variables

A public reference to the singleton LoggerSet if required for injection.
All log levels.
No description provided by the author
No description provided by the author

# Structs

A rolling file logger.
A set of log sinks (e.g., stdout, file, Sentry, etc.) Logs are sent to all sinks.
A Sentry logger.
No description provided by the author
A standard go logger with log levels.

# Interfaces

A simple logging interface.

# Type aliases

A log severity level.
No description provided by the author