Skip to content
Back to skills

Event Log

ASecurity

JSONL event stream for external integrations and hooks

  • 755 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added February 8, 2026
databasesbashapidatabase

Works with

  • claude code
  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill event-log --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Event Log?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Event Log
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-event-log/badge)](https://www.skillsdirectory.com/skills/majiayu000-event-log)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: event-log
description: JSONL event stream for external integrations and hooks
---

# Event Log

JSONL-based event logging for external program integration. Events mirror database event creation and enable hooks similar to Claude Code's event system.

## Purpose

- Emit structured events for external consumers
- Enable hook-based integrations
- Mirror the database event stream

## Log Location

- Default: `.ikigai/logs/current.log`
- Override: `$IKIGAI_LOG_DIR/current.log`

## APIs

### DI-Based (Preferred)

```c
#include "logger.h"

// Create logger with explicit context
ik_logger_t *logger = ik_logger_create(ctx, working_dir);

// Create and emit event
yyjson_mut_doc *doc = ik_log_create();
yyjson_mut_val *root = yyjson_mut_doc_get_root(doc);
yyjson_mut_obj_add_str(doc, root, "event", "chunk_received");
yyjson_mut_obj_add_int(doc, root, "bytes", len);
ik_logger_debug_json(logger, doc);  // Takes ownership, frees doc
```

### Legacy Global (Migration)

```c
// Initialize once
ik_log_init(working_dir);

// Emit events
yyjson_mut_doc *doc = ik_log_create();
// ... populate doc ...
ik_log_debug_json(doc);  // Takes ownership

// Shutdown
ik_log_shutdown();
```

## Log Levels

| Level | Function | Purpose |
|-------|----------|---------|
| debug | `ik_logger_debug_json()` | Verbose event tracing |
| info | `ik_logger_info_json()` | Normal operations |
| warn | `ik_logger_warn_json()` | Recoverable issues |
| error | `ik_logger_error_json()` | Failures |
| fatal | `ik_logger_fatal_json()` | Calls `exit(1)` after logging |

## Output Format

Each line is a JSON object:

```json
{"level":"debug","timestamp":"2025-01-15T10:30:00.123-05:00","logline":{"event":"chunk_received","bytes":1024}}
```

## Inspecting Events

```bash
tail -f .ikigai/logs/current.log
```

## Source Files

- `src/logger.h` - API declarations
- `src/logger.c` - Implementation

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in databases →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.