Logs print logs in JSON format.
Project description
Logs provides a class to save logs in json format. Typical usage often looks like this:
#!/usr/bin/env python from logs import Logs import sys logTypes = [ 'application', 'business', 'debug' ] logs = Logs('ApplicationName', logTypes) # Choosing log file name. logs.setLogType('debug') # Choosing log message Type logs.setMessageType('info') # Choosing log code id logs.setMessageCodeId('0001') # Setting message to print logs.setMessageText('Initiating application [%d]' % sys.argv[0]) # Saving Logs logs.saveLog() # Setting new message to print logs.setMessageText('Second message') logs.saveLog()