from flask import Flask, render_template, request, redirect, url_for, send_from_directory, flash, jsonify, json
from flask import current_app

from datetime import datetime
from flask_login import LoginManager, UserMixin, login_user, logout_user, login_required, current_user

import os

class LogHelper:
    @staticmethod
    def log_action(action, details=""):
        """Log user actions with timestamp, user, action, and details."""
        logData = LogData()
        logData.WriteLog(action, details="")



class LogData:

    filepath = ""
    timestamp = None

    def __init__(self):
        self.filepath = os.path.join(current_app.root_path, 'activity.log')
        self.timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
