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

Rex::Logger improvements #848

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kablamo
Copy link
Contributor

@kablamo kablamo commented Dec 2, 2015

Synopsis of changes:

use Rex;
use Rex::Logger qw/:all/;

log_debug("doing a thing");
log_info("boop");
log_warn("the core is in danger of meltdown");
log_error("the core melted");

@@ -32,11 +32,10 @@ package Rex::Logger;

use strict;
use warnings;
use Exporter::Shiny qw/debug info warn error/;
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need Exporter::Shiny as a new dependency? :)

@kablamo
Copy link
Contributor Author

kablamo commented Dec 3, 2015

  • removed Exporter::Shiny dependency even though its awesome 😭
  • warn() is a perl builtin so all methods now start with log_. Probably makes more sense to have a verb in the func name anyway.
  • force pushed
  • ready for review


sub error { logger( shift, "error" ) }
sub warn { logger( shift, "warn" ) }
sub info { logger( shift, "info" ) }
Copy link
Member

Choose a reason for hiding this comment

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

I'm afraid this breaks existing Rex::Logger::info calls in the wild, at least when they specified warn or error levels :/ Am I missing something? Maybe I'm mistaken, didn't test it yet.

@kablamo
Copy link
Contributor Author

kablamo commented Dec 9, 2015

Updated to make call to info() backwards compatible. As we agreed on irc this doesn't need to be merged until the next release. Ready for review though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants