This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
class LogHandler(object): | |
format = '%(levelname)s %(message)s' | |
files = { | |
'ERROR': 'error.log', | |
'CRITICAL': 'error.log', | |
'WARN': 'warn.log', | |
} | |
def write(self, msg): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update # Fetches the list of available updates | |
sudo apt-get upgrade # Strictly upgrades the current packages | |
sudo apt-get dist-upgrade # Installs updates (new ones) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/python | |
import logging | |
from logging.handlers import RotatingFileHandler | |
from flask import Flask, request, jsonify | |
from time import strftime | |
import traceback | |
app = Flask(__name__) |
NewerOlder