diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-12-05 15:16:31 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2017-12-05 15:17:21 +0100 |
commit | 060d4fa6dd6e98ed45381ddf1e9b9ca2407ab3b3 (patch) | |
tree | d662bdbe13a951299930d45fa69cd20e4c47356b /extensions/PhabBugz/lib/Logger.pm | |
parent | 83bc5b8c30a68203bc073b82be06585b7b6bd799 (diff) | |
download | bugzilla-060d4fa6dd6e98ed45381ddf1e9b9ca2407ab3b3.tar.gz bugzilla-060d4fa6dd6e98ed45381ddf1e9b9ca2407ab3b3.tar.xz |
Revert "Bug 1409957 - Create polling daemon to query Phabricator for recent transcations and update bug data according to revision changes"
This reverts commit 7da8e374e0c96e10077690935e829b0c04fc82f4.
Diffstat (limited to 'extensions/PhabBugz/lib/Logger.pm')
-rw-r--r-- | extensions/PhabBugz/lib/Logger.pm | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/extensions/PhabBugz/lib/Logger.pm b/extensions/PhabBugz/lib/Logger.pm deleted file mode 100644 index 3127b66db..000000000 --- a/extensions/PhabBugz/lib/Logger.pm +++ /dev/null @@ -1,37 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This Source Code Form is "Incompatible With Secondary Licenses", as -# defined by the Mozilla Public License, v. 2.0. - -package Bugzilla::Extension::PhabBugz::Logger; - -use 5.10.1; - -use Moo; - -use Bugzilla::Extension::PhabBugz::Constants; - -has 'debugging' => ( is => 'ro' ); - -sub info { shift->_log_it('INFO', @_) } -sub error { shift->_log_it('ERROR', @_) } -sub debug { shift->_log_it('DEBUG', @_) } - -sub _log_it { - my ($self, $method, $message) = @_; - - return if $method eq 'DEBUG' && !$self->debugging; - chomp $message; - if ($ENV{MOD_PERL}) { - require Apache2::Log; - Apache2::ServerRec::warn("FEED $method: $message"); - } elsif ($ENV{SCRIPT_FILENAME}) { - print STDERR "FEED $method: $message\n"; - } else { - print STDERR '[' . localtime(time) ."] $method: $message\n"; - } -} - -1; |