Skip to main content

Module for event logs handling

Project description

[!IMPORTANT]
This project is under development. All source code and features on the main branch are for the purpose of testing or evaluation and not production ready.

MFD Event Log

Module for interacting with and managing Windows Event Logs.

Usage

from mfd_connect import RPyCConnection
from mfd_event_log import EventLog, EventType

conn = RPyCConnection(ip="x.x.x.x")
eventlog_obj = EventLog(connection=conn)
eventlog_obj.clear_event_log()
eventlog_obj.get_event_log()
eventlog_obj.get_event_log(source="Microsoft-Windows-Eventlog",
	event_type=EventType.INFORMATION, event_id="104")
result = eventlog_obj.get_and_verify_event_log()
result = eventlog_obj.get_and_verify_event_log(failure_entry_types=[EventType.INFORMATION])
result = eventlog_obj.get_and_verify_event_log(ignored_event_ids=["236"])

Implemented methods

  • get_event_log(self, logger_name: str = "System", source: str = "", event_type: EventType = EventType.ALL, event_id: str = "") -> Dict[str, str] - To get Windows Event Log.

  • clear_event_log(self) -> None - Clear Windows Event Log.

  • get_and_verify_event_log(self, failure_entry_types: List[str] = None, ignored_event_ids: List[str] = None) -> bool - Get Windows Event Log and check if it contains any unwanted entries.

  • verify_event_log(self, event_log_entries: Dict[str, str], ignored_event_ids: List[str] = None) -> bool - Check if given list of Event Log entries contains any unwanted entries

  • Methods

  • verify_log(driver: str) -> str

    Checks the system log for errors.

    Parameters:

    • driver - name of driver for check

    Returns:

    • str - empty string if no errors found, error content otherwise

OS supported:

  • WINDOWS

Issue reporting

If you encounter any bugs or have suggestions for improvements, you're welcome to contribute directly or open an issue here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mfd_event_log-0.9.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file mfd_event_log-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: mfd_event_log-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mfd_event_log-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd314608cddcc55bbbd3270eb1d04df5befc86f7e3056f9153ab7d7553dc60d3
MD5 724ccf30fe20961ddc568a2c67570758
BLAKE2b-256 763abb9a23ec2ea236cdebf219e7403314f0aed4dfe8a277663c5951e6c725fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page