View Issue Details

IDProjectCategoryView StatusLast Update
0022035Plugin - EmailReportingGeneralpublic2021-01-06 17:28
Reportercproensa Assigned ToSL-Gundam  
PrioritylowSeverityfeatureReproducibilityhave not tried
Status assignedResolutionopen 
Product Version0.9.2 
Summary0022035: Format of logs for EMR job
Description

I have the cron job as defined:
/5 * php /xxx/mantis/plugins/EMR/script/bug_report_mail.php >> /xxx/logs/emr.log 2>&1

With this execution, the log file is appended with the output of the execution of bug report mail script. This leave entries like this:


Start checking all mailboxes: Monday 12th of December 2016 08:45:02

Done checking all mailboxes

It'd be nice if this output can be formatted in a more log-freindly syntax. For example:


[2016-12-20 01:02:03] Start checking all mailboxes
[2016-12-20 01:02:03] Mailbox: mailbox1 Message: Reporter: 765 - user@email.com --> Issue ID: #215237
[2016-12-20 01:02:03] Done checking all mailboxes

Or any other syntax that is suitable to grep and anlyze.

TagsNo tags attached.

Relationships

related to 0022053 closedcproensa mantisbt Implement logging functionality for plugins 

Activities

cproensa

cproensa

2016-12-12 04:07

developer   ~0054733

Actually i didn't check... is it using the core logging functionality?
This is probably the best approach.
However... It seems that there is no specific procedure for logging from a plugin, other than using any of the standard log levels (eg, LOG_EMAIL), which is not correct, imo.
This can be investigated and developed if you think it's applicable.

SL-Gundam

SL-Gundam

2016-12-12 12:42

manager   ~0054741

EmailReporting's current approach is based on the idea of a report about an execution of the script. But it definitely needs improving

Bringing it closer in line with the rest of MantisBT is always a plus imo as long as we don't lose any existing functionality