Comments (6)
Yeah, probably that's what we need although I'm not sure about rq.worker. Probably it will be better to store arthur
package too.
from grimoirelab-kingarthur.
I'm trying to get the worker log (that contains the logs of the jobs) in order to filter it by a Handler and save them in the corresponding meta log (just for testing, this will not be the code):
class MetaJobLogHandler(StreamHandler):
def __init__(self, job):
StreamHandler.__init__(self)
self.job = job
self.job.meta['log'] = ""
self.current_job = None
def emit(self, record):
msg = self.format(record)
if self.job.id in msg or not self.current_job:
self.current_job = self.job
self.current_job.meta['log'] += "{} \n".format(msg)
The problem that I faced is that the logger (logger = logging.getLogger('rq.worker')
) does not contain the logs from the Perceval job, I have to find in what logger are the Perceval logs writing.
Any idea @sduenas ?
from grimoirelab-kingarthur.
This is the logger tree level:
<--""
Level INFO
Handler <ColorizingStreamHandler <stderr> (NOTSET)>
Formatter fmt='[%(asctime)s] - %(message)s' datefmt=None
|
o<--"arthur"
| Level NOTSET so inherits level INFO
| Handler <NullHandler (NOTSET)>
| |
| o<--"arthur.events"
| | Level NOTSET so inherits level INFO
| |
| o<--"arthur.jobs"
| | Level NOTSET so inherits level INFO
| |
| o<--"arthur.worker"
| Level NOTSET so inherits level INFO
|
o<--"asyncio"
| Level NOTSET so inherits level INFO
|
o<--[concurrent]
| |
| o<--"concurrent.futures"
| Level NOTSET so inherits level INFO
|
o<--[django]
| |
| o<--"django.template"
| Level NOTSET so inherits level INFO
|
o<--"grimoirelab_toolkit"
| Level NOTSET so inherits level INFO
| Handler <NullHandler (NOTSET)>
| |
| o<--"grimoirelab_toolkit.datetime"
| Level NOTSET so inherits level INFO
|
o<--[perceval]
| |
| o<--"perceval.archive"
| | Level NOTSET so inherits level INFO
| |
| o<--"perceval.backend"
| | Level NOTSET so inherits level INFO
| |
| o<--[perceval.backends]
| | |
| | o<--[perceval.backends.core]
| | |
| | o<--"perceval.backends.core.askbot"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.bugzilla"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.bugzillarest"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.confluence"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.discourse"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.dockerhub"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.gerrit"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.git"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.github"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.gitlab"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.googlehits"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.groupsio"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.hyperkitty"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.jenkins"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.jira"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.launchpad"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.mattermost"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.mbox"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.mediawiki"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.meetup"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.nntp"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.phabricator"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.pipermail"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.redmine"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.rss"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.slack"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.stackexchange"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.supybot"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.telegram"
| | | Level NOTSET so inherits level INFO
| | |
| | o<--"perceval.backends.core.twitter"
| | Level NOTSET so inherits level INFO
| |
| o<--"perceval.client"
| | Level NOTSET so inherits level INFO
| |
| o<--"perceval.utils"
| Level NOTSET so inherits level INFO
|
o<--"requests"
| Level WARNING
| Handler <NullHandler (NOTSET)>
|
o<--"rq"
| Level NOTSET so inherits level INFO
| Handler <MetaJobLogHandler <stderr> (INFO)>
| Level INFO
| |
| o<--"rq.worker"
| Level INFO
|
o<--"urllib3"
| Level NOTSET so inherits level INFO
| Handler <NullHandler (NOTSET)>
| |
| o<--"urllib3.connection"
| | Level NOTSET so inherits level INFO
| |
| o<--"urllib3.connectionpool"
| | Level NOTSET so inherits level INFO
| |
| o<--"urllib3.poolmanager"
| | Level NOTSET so inherits level INFO
| |
| o<--"urllib3.response"
| | Level NOTSET so inherits level INFO
| |
| o<--[urllib3.util]
| |
| o<--"urllib3.util.retry"
| Level NOTSET so inherits level INFO
|
o<--"urrlib3"
Level WARNING
from grimoirelab-kingarthur.
I was thinking on adding the handler to the perceval
logger and rq.worker
logger, it works for now.
WDYT @sduenas ?
from grimoirelab-kingarthur.
@sduenas I updated the PR adding more information in the log record (date, level, module, and msg for now).
Please, check it when you have time
from grimoirelab-kingarthur.
PR updated with some tests.
Please @sduenas , check it when you have time
from grimoirelab-kingarthur.
Related Issues (20)
- pyflake errors: variables assigned to but never used
- [server] Return job_number field when querying tasks HOT 1
- Status page
- Does Arthur enrich the data? HOT 2
- Guarding against result.summary being unset
- Moving task scheduling outside of king arthur HOT 4
- Human readable job ids HOT 1
- Use Perceval summary HOT 2
- Allow to run again a failed task HOT 4
- Refactor job resuming
- Expose jobs to the REST API HOT 2
- Find a better schema for job ids
- Define better log messages
- Log messages should be printed to the stdout/stderr when --no-daemon is set
- Remove `arthur` script
- Redefine default queues
- Persistent tasks HOT 2
- Update depedencies HOT 1
- Failed tasks on 'create' queue are rescheduled into 'update' HOT 2
- Add job_number identifier to the Job meta field HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grimoirelab-kingarthur.