cuckoosandbox / cuckoo

Cuckoo Sandbox is an automated dynamic malware analysis system
http://www.cuckoosandbox.org
Other
5.55k stars 1.71k forks source link

Feature: Better Logging Architecture #625

Open KillerInstinct opened 9 years ago

KillerInstinct commented 9 years ago

There are multiple enhancements that could be done to the current logging architecture.

jbremer commented 9 years ago

Agreed on most points. @rep already proposed the task aware logging a while ago but we haven't put it to production yet. In addition to the points listed here I'd also like to see a per-task error.log which contains a dump of all exceptions that happened for this particular task. Naturally each task should have no exceptions at all, but it has happened various times where incorrect usage of 3rd party libraries caused exceptions, e.g., dpkt, pefile, volatility, etc.

jbremer commented 9 years ago

Btw, in the case of rolling logs, we do have to make sure that logs are not magically deleted. E.g., I still may want to see the logs of an analysis half a million analyses later ;)

KillerInstinct commented 8 years ago

Stumbled back across then when I was checking Issues I was involved in. I ended up coding the third point because an upstart job fails to account for when you want to reprocess and analysis, you're still only left with logging to STDOUT. This solves that.

Relevant commits: https://github.com/spender-sandbox/cuckoo-modified/commit/e22b9adf2144c5617738096fe879942277e531bd https://github.com/spender-sandbox/cuckoo-modified/commit/00f176cd61f1c6891e0c8550a422e02a7c72c03e

Feel free to use/improve.

jbremer commented 8 years ago

Having forgotten about this issue, some of the suggestions have been implemented by now. In particular: more task ID logging, per-task logging, process.py logging (in #863), and the task aware logging. I guess the rest have yet to be done :-)