From b8925641954c009275441565ed76d3732a2def4b Mon Sep 17 00:00:00 2001 From: "angre.garcia-gomez@ait.ac.at" Date: Tue, 14 Apr 2026 10:57:07 +0200 Subject: [PATCH] add doc --- docs/basic_idea.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++ docs/index.md | 1 + mkdocs.yml | 1 + 3 files changed, 68 insertions(+) create mode 100644 docs/basic_idea.md diff --git a/docs/basic_idea.md b/docs/basic_idea.md new file mode 100644 index 0000000..f7bbad2 --- /dev/null +++ b/docs/basic_idea.md @@ -0,0 +1,66 @@ +# Basic Concepts + +DetectMateLibrary is a collection of utilities for detecting anomalies in system logs. This short tutorial explains the core concepts you need to get started. + +## What is a log? + +Logs are messages produced by logging statements in code that describe events or state during execution. + +Example code that produces a log: + +```python +import logging + +var1 = "DetectMate getting started" +var2 = "what is a log" + +logging.info(f"hello I am a log about {var1} and about {var2}") +``` + +This produces the message: + +``` +hello I am a log about DetectMate getting started and about what is a log +``` + +A log message can be split into a constant part (the template) and variable parts. For example: + +- Template: `hello I am a log about <*> and about <*>` +- Variables: `["DetectMate getting started", "what is a log"]` + +Logs often include a prefix with metadata, for example: + +``` +INFO [18-05-2005] hello I am a log about DetectMate getting started and about what is a log +``` + +To extract the metadata we define a log format. For the example above: + +``` + [