-
Notifications
You must be signed in to change notification settings - Fork 161
Closed
Labels
completedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilityThis item refers to a feature request for an existing or new utilitygood-first-issueSomething that is suitable for those who want to start contributingSomething that is suitable for those who want to start contributingloggerThis item relates to the Logger UtilityThis item relates to the Logger Utility
Description
Summary
LogLevel for the lambda is currently a type
type LogLevelDebug = 'DEBUG';
type LogLevelInfo = 'INFO';
type LogLevelWarn = 'WARN';
type LogLevelError = 'ERROR';
type LogLevelSilent = 'SILENT';
type LogLevelCritical = 'CRITICAL';
type LogLevel = LogLevelDebug | Lowercase<LogLevelDebug> | LogLevelInfo | Lowercase<LogLevelInfo> | LogLevelWarn | Lowercase<LogLevelWarn> | LogLevelError | Lowercase<LogLevelError> | LogLevelSilent | Lowercase<LogLevelSilent> | LogLevelCritical | Lowercase<LogLevelCritical>;
Can we turn this into an enum and export it ?
Why is this needed?
We can import this enum and use it
Which area does this relate to?
Logger
Solution
enum LogLevel {
DEBUG = "DEBUG",
INFO = "INFO",
ERROR = "ERROR",
SILENT = "SILENT",
CRITICAL= "CRITICAL"
}
type LogLevelType = LogLevel | Lowercase<LogLevel>
Acknowledgment
- This request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
Metadata
Metadata
Assignees
Labels
completedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilityThis item refers to a feature request for an existing or new utilitygood-first-issueSomething that is suitable for those who want to start contributingSomething that is suitable for those who want to start contributingloggerThis item relates to the Logger UtilityThis item relates to the Logger Utility
Type
Projects
Status
Shipped