Frappe Core Logging logo

Frappe Core Logging

Organization
Impertio-Studio
frappe-core-logging

Use when implementing logging, error tracking, or monitoring in Frappe v14-v16. Covers frappe.logger() for file-based logging, frappe.log_error() for Error Log DocType entries, request logging, Sentry integration, and production logging patterns. Prevents common mistakes with print(), swapped log_error arguments, and sensitive data. Keywords: frappe.logger, log_error, Error Log, logging, Sentry,, where are the logs, how to log errors, error tracking, print not showing, production logs. monitor, request logging, error tracking, debug, production.

Overview

PublisherImpertio-Studio
RepositoryFrappe_Claude_Skill_Package
Skill namefrappe-core-logging
Stars
180
Forks
53
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Impertio-Studio on GitHub. Read the source before you install it.

Installation

Install the Frappe Core Logging AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package.git /tmp/Frappe_Claude_Skill_Package
mkdir -p .claude/skills
cp -r /tmp/Frappe_Claude_Skill_Package/skills/source/core/frappe-core-logging .claude/skills/frappe-core-logging
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Frappe Core Logging in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Frappe Core Logging on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Frappe Core Logging is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Frappe Logging & Error Tracking

Three Logging Mechanisms

MechanismStorageUse For
frappe.logger()File (rotating)Application logging, debug info, audit trails
frappe.log_error()Database (Error Log DocType)Errors visible in admin UI, persistent tracking
frappe.log() / frappe.errprint()stderr / request-scopedQuick debugging only (NOT for production)

Decision Tree

Need to log something?
├─ Application logging (info, debug, warnings)?
│  └─ frappe.logger("my_module").info("message")
│     → Writes to sites/{site}/logs/my_module.log
├─ Error that admins should see in Desk UI?
│  └─ frappe.log_error(title="Short desc", message=traceback)
│     → Creates Error Log document (queryable, auto-cleanup)
├─ Quick debug during development?
│  └─ frappe.errprint(variable) — shows in console
│     → NEVER leave in production code
├─ Track all HTTP requests?
│  └─ Set enable_frappe_logger: true in site_config.json
│     → Logs to frappe.web.log
├─ Performance monitoring?
│  └─ Set monitor: true in site_config.json
│     → Logs to monitor.json.log (JSON, per-request metrics)
└─ External error tracking (Sentry)?
   └─ Set FRAPPE_SENTRY_DSN environment variable
      → Auto-captures unhandled exceptions

Quick Reference: frappe.logger()

python
# Get a logger for your module (ALWAYS specify module name)
logger = frappe.logger("my_app")

# Standard Python logging levels
logger.debug("Detailed diagnostic info")
logger.info("Normal operations: processed 50 records")
logger.warning("Something unexpected but recoverable")
logger.error("Operation failed", exc_info=True)
logger.critical("System-level failure")

# Full signature
frappe.logger(
    module=None,          # Logger name + log filename
    with_more_info=False, # Auto-log request form_dict
    allow_site=True,      # Log under site's logs/ directory
    filter=None,          # Custom logging.Filter
    max_size=100_000,     # Max bytes per log file (100KB default)
    file_count=20         # Rotated files retained (20 default)
)

Log location: sites/{site}/logs/{module}.log Rotation: RotatingFileHandler — 100KB per file, 20 backups (~2MB total per logger)

Default Log Levels

ModeLevelEffect
Development (_dev_server)WARNINGDebug/info suppressed
ProductionERROROnly errors and above
python
# Change level dynamically
frappe.utils.logger.set_log_level("DEBUG")

Quick Reference: frappe.log_error()

python
# ALWAYS use keyword arguments (title/message can swap otherwise)
frappe.log_error(
    title="Payment gateway timeout",          # Short description (140 chars max)
    message=frappe.get_traceback(),            # Full error details
    reference_doctype="Payment Entry",        # Related DocType
    reference_name="PE-00001"                 # Related document
)

# Minimal — auto-captures current traceback
try:
    risky_operation()
except Exception:
    frappe.log_error(title="Operation failed")

Error Log cleanup: Auto-deletes after 30 days. Manual: frappe.whitelist: clear_error_logs()

Auto-Captured Exceptions

Unhandled exceptions (HTTP 500+) are automatically logged to Error Log.

Excluded from auto-capture:

  • frappe.AuthenticationError
  • frappe.CSRFTokenError
  • frappe.SecurityException
  • frappe.InReadOnlyMode

Production Configuration

site_config.json Keys

KeyValueEffect
enable_frappe_loggertrueHTTP request logging → frappe.web.log
logging2Log all SQL queries (debug only!)
monitortrueRequest/job metrics → monitor.json.log
disable_error_snapshottrueDisable auto-capture of exceptions

Environment Variables

VariableEffect
FRAPPE_STREAM_LOGGING=1Log to stderr instead of files
FRAPPE_SENTRY_DSN=<dsn>Enable Sentry error tracking
ENABLE_SENTRY_DB_MONITORINGTrack SQL queries in Sentry
SENTRY_TRACING_SAMPLE_RATEPerformance tracing rate (0.0-1.0)

Production Log Files

FileContent
logs/web.error.logHTTP errors (supervisor)
logs/web.logGunicorn stdout
logs/worker.error.logBackground job errors
logs/frappe.logDefault frappe logger
logs/frappe.web.logHTTP request metadata
logs/monitor.json.logPerformance metrics (JSON)
sites/{site}/logs/*.logPer-site application logs

Anti-Patterns

NEVERALWAYSWhy
print("debug info")frappe.logger("mod").info(...)print() disappears in production
frappe.log_error("info msg")frappe.logger().info(...)log_error creates Error Log docs, clutters admin UI
frappe.logger() (no module)frappe.logger("my_module")No-module mixes with framework logs
frappe.log_error(title, msg) positionalfrappe.log_error(title=t, message=m)Positional args can swap (known quirk)
Log passwords/tokensMask sensitive dataSiteContextFilter only masks form_dict
frappe.log() in productionfrappe.logger()frappe.log() is debug-only, request-scoped
Leave logging=2 in prodOnly during debuggingLogs ALL SQL queries, massive I/O

Version Differences

Featurev14v15+
frappe.logger()YesYes
frappe.log_error()Yes+ defer_insert kwarg
Error Log trace_id--Added
Error Log metadata--JSON request/job context
Error snapshotsFile-based + scheduled collectionDirect DB insert
Sentry integrationBasicEnhanced (DB monitoring, profiling)
guess_exception_source()--Identifies which app caused error
FRAPPE_STREAM_LOGGINGYesYes

Reference Files

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Frappe Core Logging AI skill do?

Use when implementing logging, error tracking, or monitoring in Frappe v14-v16. Covers frappe.logger() for file-based logging, frappe.log_error() for Error Log DocType entries, request logging, Sentry integration, and production logging patterns. Prevents common mistakes with print(), swapped log_error arguments, and sensitive data. Keywords: frappe.logger, log_error, Error Log, logging, Sentry,, where are the logs, how to log errors, error tracking, print not showing, production logs. monitor, request logging, error tracking, debug, production.

Why use Frappe Core Logging on TypingMind?

Because you install it once and use it with any model. Frappe Core Logging is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Frappe Core Logging in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package/tree/main/skills/source/core/frappe-core-logging. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Frappe Core Logging?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Frappe Core Logging?

As many as you like. As long as a model supports skills, you can use Frappe Core Logging with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Frappe Core Logging AI skill free?

Yes. It is published on GitHub by Impertio-Studio under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇