Unify reason message format

Use the same message for abrt and log:

(Caught|Uncaght) exception $FQDN_TYPE in method $FQDN_METHOD

The new format misses thread name and method signature. Thread's name is
available in stack trace and method's signature is useful only for
debugging.

Length of the reason message is limited to 255 characters. If the
message exceeds that limit, algorithm tries to generate the message
according to the following formats:

(Caught|Uncaght) exception $FQDN_TYPE in method $CLASS_NAME_METHOD
(Caught|Uncaght) exception $EXCEPTION_CLASS in method $CLASS_NAME_METHOD
(Caught|Uncaght) exception $EXCEPTION_CLASS in method $METHOD

The first suitable message is used. If none of these formats generate an
acceptable message, the last format is used and the message is truncated.

Related to rhbz#1023081

Signed-off-by: Jakub Filak <jfilak@redhat.com>
Adapt tests to the recent changes in formats

Related to rhbz#1023081
Add tests for reason message shortening

Related to rhbz#1023081

Signed-off-by: Jakub Filak <jfilak@redhat.com>
Fix a bug in testdriver

Signed-off-by: Jakub Filak <jfilak@redhat.com>
Add support for changing log directory

The current implementation writes to a file in CWD.

This patch allows users to pass a path to a directory in output command
line argument. If a value of the output argument points to a directory,
the log file path is set to $output/abrt_checker_$PID.log

Related to rhbz#1023081

Signed-off-by: Jakub Filak <jfilak@redhat.com>
Make log output disabled by default

Related to rhbz#1023081

Signed-off-by: Jakub Filak <jfilak@redhat.com>
Add support for journald and syslog

Two new command line arguments:
    syslog=(on|yes)
        - disabled by default
        - logs a stack trace to syslog with LOG_ERR level

    journald=(off|no)
        - disabled by default
        - logs a stack trace to journald with LOG_ERR level
        - the stack trace is saved in STACK_TRACE field

Related to rhbz#1023081

Signed-off-by: Jakub Filak <jfilak@redhat.com>
Completely disable logging in ThreadStressTest
Merge pull request #22 from jfilak/rhbz1023081

Switch from logging to a file to usage of journald