Changeset 461:818f9fd41fdf
- Timestamp:
- 08/04/08 16:52:49
(5 months ago)
- Author:
- "Brian Warner <warner@lothar.com>"
- branch:
- default
- Message:
change incident-gatherer filenames to be more distinct from each other
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r460 |
r461 |
|
| 1 | 1 | 2008-08-04 Brian Warner <warner@lothar.com> |
|---|
| | 2 | |
|---|
| | 3 | * doc/logging.xhtml: change filenames in the incident-gatherer to |
|---|
| | 4 | have fewer files starting with incident*, so tab-completion works |
|---|
| | 5 | better. |
|---|
| | 6 | * foolscap/logging/gatherer.py (IncidentGathererService): same |
|---|
| | 7 | (create_incident_gatherer): same |
|---|
| 2 | 8 | |
|---|
| 3 | 9 | * foolscap/test/test_logging.py (Filter): test 'flogtool filter' |
|---|
| r440 |
r461 |
|
| 842 | 842 | % flogtool create-incident-gatherer ig |
|---|
| 843 | 843 | Gatherer created in directory ig |
|---|
| 844 | | Now run '(cd ig && twistd -y incident-gatherer.tac)' to launch the daemon |
|---|
| | 844 | Now run '(cd ig && twistd -y gatherer.tac)' to launch the daemon |
|---|
| 845 | 845 | % cd ig |
|---|
| 846 | 846 | % ls |
|---|
| 847 | | incident-gatherer.tac |
|---|
| 848 | | % twistd -y incident-gatherer.tac |
|---|
| | 847 | gatherer.tac |
|---|
| | 848 | % twistd -y gatherer.tac |
|---|
| 849 | 849 | % |
|---|
| 850 | 850 | </pre> |
|---|
| … | … | |
| 868 | 868 | functions to analyze each Incident and place it into one or more categories. |
|---|
| 869 | 869 | To add a classification function, you will need to modify the |
|---|
| 870 | | <code>incident-gatherer.tac</code> file, and make a call to |
|---|
| | 870 | <code>gatherer.tac</code> file, and make a call to |
|---|
| 871 | 871 | <code>ig.add_classifier()</code> with your function. These functions accept a |
|---|
| 872 | 872 | triggering event and a pathname (from which preceding log events can be |
|---|
| r459 |
r461 |
|
| 397 | 397 | implements(RILogGatherer) |
|---|
| 398 | 398 | verbose = True |
|---|
| 399 | | furlFile = "incident_gatherer.furl" |
|---|
| 400 | | tacFile = "incident-gatherer.tac" |
|---|
| | 399 | furlFile = "log_gatherer.furl" |
|---|
| | 400 | tacFile = "gatherer.tac" |
|---|
| 401 | 401 | |
|---|
| 402 | 402 | def __init__(self, classifiers=[], basedir=None, stdout=None): |
|---|
| … | … | |
| 521 | 521 | if not os.path.exists(basedir): |
|---|
| 522 | 522 | os.makedirs(basedir) |
|---|
| 523 | | f = open(os.path.join(basedir, "incident-gatherer.tac"), "w") |
|---|
| | 523 | f = open(os.path.join(basedir, "gatherer.tac"), "w") |
|---|
| 524 | 524 | stashed_path = "" |
|---|
| 525 | 525 | for p in sys.path: |
|---|
| … | … | |
| 530 | 530 | if not config["quiet"]: |
|---|
| 531 | 531 | print >>stdout, "Incident Gatherer created in directory %s" % basedir |
|---|
| 532 | | print >>stdout, "Now run '(cd %s && twistd -y incident-gatherer.tac)' to launch the daemon" % basedir |
|---|
| | 532 | print >>stdout, "Now run '(cd %s && twistd -y gatherer.tac)' to launch the daemon" % basedir |
|---|