Adding a package special log file to apport
Daniel Manrique
daniel.manrique at canonical.com
Fri May 18 19:09:52 UTC 2012
On 12-05-18 01:39 PM, Lars Düsing wrote:
> Hi all,
> Is there any way to add a log file to apport on crash of a specific package?
> I need /var/log/aiccu.log on crash of aiccu...
>
> Thanks,
> Lars
>
Look here for information on how to add package hooks to do stuff like this:
https://wiki.ubuntu.com/Apport/DeveloperHowTo#Package_Hooks
In brief (and don't believe me too much, I've never done it, I'm just reading
the docs and comparing against what a package I know does this has):
- Add a Python script/file/hook to your package (say, aiccu.py) with something
like this:
from apport.hookutils import *
def add_info(report, ui=None):
attach_file_if_exists(report, '/var/log/aiccu.log', key='aiccuLog')
report['SecretMessage'] = 'my hook was here'
- Make sure your package installs it in /usr/share/apport/package-hooks/aiccu.py.
- Daniel
More information about the Ubuntu-bugsquad
mailing list