orlikoski / Skadi

Collect, Process, and Hunt with host based data from MacOS, Windows, and Linux
https://www.skadivm.com
GNU General Public License v3.0
489 stars 71 forks source link

Logging #36

Closed chunderstruck closed 6 years ago

chunderstruck commented 6 years ago

Added logging functionality, by default logs to /var/log/ccfvm.log May need additional verification to make sure that we are getting proper console logging. Not sure if that is going to matter in the long run but may be an issue while in development.

Can monitor logs while testing: tail -f /var/log/ccfvm.log

Added to automation.sh logging configuration file, this can be used in any other module that may need logging support. (GRPC?)

orlikoski commented 6 years ago

This is great! Can you make so that it prints and logs each thing? What's the easiest way to do that? Maybe an output function that takes text to both? Maybe something like that exists already... idk but this looks good

orlikoski commented 6 years ago

Let me clarify. I want some provide some sort of terminal feedback that the automation tool shows the user as the return feedback. If everything goes to the logs then there is no feedback going back through stdin that the automation tool can provide back to the users

chunderstruck commented 6 years ago

echo "Getting Python dependencies" -pip install boto3 +pip install -r requirements.txt

This should install all dependencies not just boto3. Moved boto3 into requirements.txt so if desired later we can move the requirements into the build script.

orlikoski commented 6 years ago

Yeah, that makes sense

chunderstruck commented 6 years ago

Working on using a different configuration file format that may allow for more functionality... stand by...

chunderstruck commented 6 years ago

Currently only logging items in rc.py, logging levels can be modified in the configuration file so not logging every single action to the logfile or console. By setting default logging levels to INFO, where as the current level for everything is DEBUG.

chunderstruck commented 6 years ago

Example of the output from log files.

screen shot 2018-03-24 at 2 22 57 pm
orlikoski commented 6 years ago

This looks good. Merging