Implementing a Common Event Expression (CEE) Centralized Logging Server with Python

Tamir Suliman
2 min read6 days ago
Photo by Claudio Schwarz on Unsplash

In this article, we’ll introduce a lightweight implementation of a Common Event Expression (CEE) logging server using Python. This project is designed to standardize event logging and facilitate better log management by processing events in both JSON and XML formats. The server provides a centralized endpoint for logging events and stores them securely in separate log files.

Key Features

  • Unified Logging Endpoint: Accepts events via HTTP PUT requests at the /cee endpoint.
  • Support for Multiple Formats: Processes both JSON and XML formatted events.
  • Validation: Validates incoming data and rejects malformed requests.
  • Scalable Logging: Logs data into format-specific files, rotated daily.
  • Graceful Shutdown: Ensures ongoing requests complete and logs are flushed when stopping the server.

How It Works

Endpoint Handling:

  • The server listens on port 8000.
  • Events are accepted via /cee (PUT requests).
  • A simple GET request on /cee checks the server status.

Event Processing:

  • Events are validated for…

--

--

Tamir Suliman
Tamir Suliman

Written by Tamir Suliman

Writer, Engineer, Cyber security enthusiast ,PhD. Candidate & 4 Open Source write about my day to day experience in Software Data, and Engineering.

No responses yet