SpikeLogger - Overdrive77/BioSynapStudio-Public GitHub Wiki


SpikeLogger Class

Handles centralized logging of neuron spike events, decay updates, and tick timing during simulation.


Namespace

BioSynapStudio.Net.Core.Utils

Assembly

BioSynapStudio.Net.Core.dll

Summary

The SpikeLogger class provides static logging functionality for simulation diagnostics and debugging. It writes timestamped spike-related messages to disk, the console, or both, depending on the configured logging mode.


Static Properties

Name Type Description
LogMode SpikeLogType Determines how spike messages are logged (console, file, both, or off). Defaults to SaveToDiskAndWriteToConsole.

Static Methods

Log(string message)

Logs the given message using the configured logging mode. Supports color-coded console output for spikes, decay, and tick updates.

SpikeLogger.Log("[Spike] Neuron #23 fired");

Parameters:

  • message – The message to log.

Behavior:

  • Prefixes each message with a timestamp.

  • Uses color-coded output:

    • [Spike] → Green
    • [Decay] → Red
    • Tick → Cyan
    • Other → Gray
  • Writes to file: NeuronSpiking_Log.txt in the app’s base directory.

  • Thread-safe using a lock on file writes.


Remarks

This utility class is ideal for real-time monitoring and post-simulation analysis. Its flexible configuration and formatted output support both performance debugging and research traceability.


See Also


Legal Notice This software constitutes original intellectual property of the author, protected under international copyright and patent law. Patent: GB2506327.2 – Synthesized Emotional Cognition (SEC) DOI: 10.17605/OSF.IO/XERKF