Skip to content

Add LLM application logging example for AI-powered features - #548

Draft
luoheng158 with Copilot wants to merge 7 commits into
masterfrom
copilot/add-aweme-llm-apps
Draft

Add LLM application logging example for AI-powered features#548
luoheng158 with Copilot wants to merge 7 commits into
masterfrom
copilot/add-aweme-llm-apps

Conversation

Copilot AI commented Jan 2, 2026

Copy link
Copy Markdown

Adds reference implementation for integrating Logan logging into LLM-based applications, demonstrating structured logging patterns for AI features in platforms like Aweme/TikTok.

Implementation

Example/Logan-LLM-Apps/app.ts - Chat server with comprehensive logging:

  • User prompt logging with session tracking
  • LLM response metadata (tokens, latency, model)
  • Performance metrics and error tracking
  • RESTful API (POST /chat, GET /chat/:sessionId)

Example/Logan-LLM-Apps/client-example.ts - Client demonstrating API usage with axios

Example/Logan-LLM-Apps/README.md - Integration patterns and production best practices

Logging Pattern

// User interaction
LLMLogger.logUserPrompt(userId, sessionId, prompt);

// LLM response with metadata
LLMLogger.logLLMResponse(userId, sessionId, response, model, tokens, latency);

// Performance monitoring
LLMLogger.logPerformanceMetric('response_time', latency, { userId, sessionId, tokens });

All logs use structured JSON format for easy parsing. The example uses console output; README documents integration with actual Logan SDK.

Files Added

  • app.ts (220 lines) - Chat application with simulated LLM service
  • client-example.ts (103 lines) - Example client
  • README.md - Documentation with API reference and integration guide
  • package.json, tsconfig.json, .gitignore

Updated main README.md to reference new example.

Original prompt

aweme llm apps


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 6 commits January 2, 2026 05:56
Co-authored-by: luoheng158 <7459742+luoheng158@users.noreply.github.com>
Co-authored-by: luoheng158 <7459742+luoheng158@users.noreply.github.com>
Co-authored-by: luoheng158 <7459742+luoheng158@users.noreply.github.com>
Co-authored-by: luoheng158 <7459742+luoheng158@users.noreply.github.com>
Co-authored-by: luoheng158 <7459742+luoheng158@users.noreply.github.com>
…tions

Co-authored-by: luoheng158 <7459742+luoheng158@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Aweme LLM applications support Add LLM application logging example for AI-powered features Jan 2, 2026
Copilot AI requested a review from luoheng158 January 2, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants