From 54878ddb0b2078663480312fb8bc33fb280da0de Mon Sep 17 00:00:00 2001 From: Jono Wenger <jono@elixxir.io> Date: Tue, 24 Jan 2023 11:57:36 -0800 Subject: [PATCH] Fix INFO logs and add package descrption --- emoji/emojiSet.go | 4 ++-- emoji/main.go | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/emoji/emojiSet.go b/emoji/emojiSet.go index 2a903774..147d8811 100644 --- a/emoji/emojiSet.go +++ b/emoji/emojiSet.go @@ -55,13 +55,13 @@ func (s *Set) SanitizeEmojiMartSet(frontendEmojiSetJson []byte) ([]byte, error) "failed to unmarshal emoji-mart set JSON: %+v", err) } - jww.INFO.Printf( + jww.DEBUG.Printf( "Finding incompatible emojis and replacing mismatched codepoints.") // Find all incompatible emojis in the front end set emojisToRemove := s.findIncompatibleEmojis(&frontEndEmojiSet) - jww.INFO.Printf("Removing incompatible emojis.") + jww.DEBUG.Printf("Removing incompatible emojis.") // Remove all incompatible emojis from the set removeIncompatibleEmojis(&frontEndEmojiSet, emojisToRemove) diff --git a/emoji/main.go b/emoji/main.go index 135d7cab..174414d9 100644 --- a/emoji/main.go +++ b/emoji/main.go @@ -5,6 +5,10 @@ // LICENSE file. // //////////////////////////////////////////////////////////////////////////////// +// package main is its own utility that is compiled separate from xxdk-WASM. It +// is used only to produce a compatible emoji file to be used by the frontend +// and is not a WASM module itself. + package main import ( @@ -67,8 +71,7 @@ var cmd = &cobra.Command{ jww.FATAL.Panicf("Bad status: %s", resp.Status) } - jww.INFO.Printf("Received HTTP response: %s", resp.Status) - jww.DEBUG.Printf("Response: %+v", resp) + jww.DEBUG.Printf("Received HTTP response: %+v", resp) // Read HTTP response into byte slice var buf bytes.Buffer @@ -81,7 +84,7 @@ var cmd = &cobra.Command{ } emojiMartJson := buf.Bytes() - jww.INFO.Printf("Read %d bytes of JSON file", len(emojiMartJson)) + jww.DEBUG.Printf("Read %d bytes of JSON file", len(emojiMartJson)) // Sanitize the JSON file backendSet := NewSet() @@ -90,7 +93,7 @@ var cmd = &cobra.Command{ jww.FATAL.Panicf("Failed to sanitize emoji-mart list: %+v", err) } - jww.INFO.Printf("Sanitised JSON file.") + jww.DEBUG.Printf("Sanitised JSON file.") // Write sanitized JSON to file err = utils.WriteFileDef(outputPath, sanitizedJSON) -- GitLab