summaryrefslogtreecommitdiffstats
path: root/contrib/restricted/aws/aws-c-common/source/log_formatter.c
diff options
context:
space:
mode:
authorthegeorg <[email protected]>2025-05-12 15:51:24 +0300
committerthegeorg <[email protected]>2025-05-12 16:06:27 +0300
commitd629bb70c8773d2c0c43f5088ddbb5a86d8c37ea (patch)
tree4f678e0d65ad08c800db21c657d3b0f71fafed06 /contrib/restricted/aws/aws-c-common/source/log_formatter.c
parent92c4b696d7a1c03d54e13aff7a7c20a078d90dd7 (diff)
Update contrib/restricted/aws libraries to nixpkgs 24.05
commit_hash:f8083acb039e6005e820cdee77b84e0a6b6c6d6d
Diffstat (limited to 'contrib/restricted/aws/aws-c-common/source/log_formatter.c')
-rw-r--r--contrib/restricted/aws/aws-c-common/source/log_formatter.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/contrib/restricted/aws/aws-c-common/source/log_formatter.c b/contrib/restricted/aws/aws-c-common/source/log_formatter.c
index d4be0c0c6d2..b6e74e40775 100644
--- a/contrib/restricted/aws/aws-c-common/source/log_formatter.c
+++ b/contrib/restricted/aws/aws-c-common/source/log_formatter.c
@@ -20,15 +20,17 @@
# pragma warning(disable : 4204) /* non-constant aggregate initializer */
#endif
-/* (max) strlen of "[<LogLevel>]" */
-#define LOG_LEVEL_PREFIX_PADDING 7
+enum {
+ /* (max) strlen of "[<LogLevel>]" */
+ LOG_LEVEL_PREFIX_PADDING = 7,
-/* (max) strlen of "[<ThreadId>]" */
-#define THREAD_ID_PREFIX_PADDING 22
+ /* (max) strlen of "[<ThreadId>]" */
+ THREAD_ID_PREFIX_PADDING = 22,
-/* strlen of (user-content separator) " - " + "\n" + spaces between prefix fields + brackets around timestamp + 1 +
- subject_name padding */
-#define MISC_PADDING 15
+ /* strlen of (user-content separator) " - " + "\n" + spaces between prefix fields + brackets around timestamp + 1 +
+ subject_name padding */
+ MISC_PADDING = 15,
+};
#define MAX_LOG_LINE_PREFIX_SIZE \
(LOG_LEVEL_PREFIX_PADDING + THREAD_ID_PREFIX_PADDING + MISC_PADDING + AWS_DATE_TIME_STR_MAX_LEN)
@@ -203,7 +205,7 @@ static int s_default_aws_log_formatter_format(
struct aws_default_log_formatter_impl *impl = formatter->impl;
if (formatted_output == NULL) {
- return AWS_OP_ERR;
+ return aws_raise_error(AWS_ERROR_INVALID_ARGUMENT);
}
/*