Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fmt/log.Println like logging, Adding more verbosity #280

Merged
merged 1 commit into from Mar 28, 2020

Conversation

kennedy
Copy link
Contributor

@kennedy kennedy commented Mar 28, 2020

  1. Increased verbosity:
    • Whenever an irc handler triggers
    • Whenever an irc event handler has been added. Provides more details into which handlers were added.
  2. Added log notification when telegram bot has logged in.

Increased verbosity for ircc handler triggers.
Logging each event handler as it is added, instead of a general add. Provides more details into which handlers were added.
Added log notification when telegram bot has logged inn.
@kennedy kennedy self-assigned this Mar 28, 2020
@@ -14,33 +14,33 @@ var (

// DebugLogger provides an interface to call the logging functions
type DebugLogger interface {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Behaves just like fmt.Println() or log.Println()
for example: logger.LogInfo("random pre-fix string", 10) # random pre-fix string 10

@kennedy kennedy marked this pull request as ready for review March 28, 2020 02:52
@kennedy kennedy requested a review from jwflory March 28, 2020 16:37
Copy link
Member

@kevinassogba kevinassogba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of interface is definitely a good idea. Overall, I think is it a good PR. Before merging, would you add a space before concatenating string on these lines?
c.logger.LogInfo("Adding IRC event handler:", eventType)
tg.logger.LogInfo("Authorized on account",tg.api.Self.UserName)

@kennedy
Copy link
Contributor Author

kennedy commented Mar 28, 2020

would you add a space before concatenating string on these lines?

@10eMyrT Fortunately a space is automatically joined between the interfaces

Copy link
Member

@Tjzabel Tjzabel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@kennedy kennedy merged commit 68c8cc6 into master Mar 28, 2020
@kennedy kennedy deleted the hotfix/logging-println-expand branch March 28, 2020 20:40
@kennedy
Copy link
Contributor Author

kennedy commented Mar 28, 2020

mergeeeed

@jwflory jwflory added improvement Improves on something that already exists IRC Issues relating to the IRC bridge Telegram Issues relating to Telegram bridge labels Mar 30, 2020
@jwflory jwflory added this to In progress in TeleIRC development via automation Mar 30, 2020
@jwflory jwflory added this to the v2.0.0 milestone Mar 30, 2020
@jwflory jwflory moved this from In progress to Done in TeleIRC development Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improves on something that already exists IRC Issues relating to the IRC bridge Telegram Issues relating to Telegram bridge
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants